Skip to content

Commit

Permalink
Ensure METACPAN_SERVER_CONFIG_LOCAL_SUFFIX is set on Travis and in lo…
Browse files Browse the repository at this point in the history
…cal test ENV.
  • Loading branch information
oalders committed Apr 29, 2016
1 parent 6087f98 commit 8a7d9c5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Expand Up @@ -26,6 +26,9 @@ env:
# that the snapshot was built from.
- DEPLOYMENT_PERL_VERSION=5.18

# Instantiate Catalyst models using metacpan_server_testing.conf
- METACPAN_SERVER_CONFIG_LOCAL_SUFFIX=testing


before_install:
- sudo service elasticsearch stop && curl -O -L https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-2.3.0.deb && sudo dpkg -i --force-confnew elasticsearch-2.3.0.deb && sudo service elasticsearch start
Expand Down
2 changes: 2 additions & 0 deletions bin/prove
Expand Up @@ -2,4 +2,6 @@

export EMAIL_SENDER_TRANSPORT=Test
export ES=localhost:9900
export METACPAN_SERVER_CONFIG_LOCAL_SUFFIX=testing

`dirname "$0"`/run prove -It/lib -lvr "$@"
6 changes: 0 additions & 6 deletions lib/MetaCPAN/Server/Test.pm
Expand Up @@ -14,8 +14,6 @@ our @EXPORT = qw(
test_psgi app
);

BEGIN { $ENV{METACPAN_SERVER_CONFIG_LOCAL_SUFFIX} = 'testing'; }

sub _prepare_user_test_data {
ok(
my $user = MetaCPAN::Server->model('User::Account')->put(
Expand Down Expand Up @@ -82,10 +80,6 @@ sub model {
# ABSTRACT: Test class for MetaCPAN::Web
=head1 ENVIRONMENTAL VARIABLES
Sets C<METACPAN_SERVER_CONFIG_LOCAL_SUFFIX> to C<testing>.
=head1 EXPORTS
=head2 GET
Expand Down
4 changes: 2 additions & 2 deletions metacpan_server_testing.conf
@@ -1,5 +1,5 @@
cpan t/var/tmp/fakecpan
source_base t/var/tmp/source
cpan var/t/tmp/fakecpan
source_base var/t/tmp/source

<model CPAN>
servers __ENV(ES)__
Expand Down

0 comments on commit 8a7d9c5

Please sign in to comment.