Permalink
Browse files

Use $TEST_NGINX_POSTGRESQL_HOST instead of hardcoded value.

  • Loading branch information...
1 parent f28923c commit 15d137c9b65c67b96226cefd14af21304da54957 @PiotrSikora PiotrSikora committed Nov 10, 2011
Showing with 29 additions and 16 deletions.
  1. +2 −1 t/000_init.t
  2. +2 −1 t/auth.t
  3. +2 −1 t/bigpipe.t
  4. +4 −3 t/errors.t
  5. +2 −1 t/eval.t
  6. +2 −1 t/form.t
  7. +2 −1 t/methods.t
  8. +2 −1 t/output.t
  9. +2 −1 t/restful.t
  10. +2 −1 t/restful_json.t
  11. +2 −1 t/rewrites.t
  12. +3 −2 t/sanity.t
  13. +2 −1 t/variables.t
View
@@ -7,11 +7,12 @@ repeat_each(1);
plan tests => repeat_each() * blocks();
+$ENV{TEST_NGINX_POSTGRESQL_HOST} ||= '127.0.0.1';
$ENV{TEST_NGINX_POSTGRESQL_PORT} ||= 5432;
our $http_config = <<'_EOC_';
upstream database {
- postgres_server 127.0.0.1:$TEST_NGINX_POSTGRESQL_PORT
+ postgres_server $TEST_NGINX_POSTGRESQL_HOST:$TEST_NGINX_POSTGRESQL_PORT
dbname=ngx_test user=ngx_test password=ngx_test;
}
_EOC_
View
@@ -7,11 +7,12 @@ repeat_each(2);
plan tests => repeat_each() * (blocks() * 3 - 2 * 1);
+$ENV{TEST_NGINX_POSTGRESQL_HOST} ||= '127.0.0.1';
$ENV{TEST_NGINX_POSTGRESQL_PORT} ||= 5432;
our $http_config = <<'_EOC_';
upstream database {
- postgres_server 127.0.0.1:$TEST_NGINX_POSTGRESQL_PORT
+ postgres_server $TEST_NGINX_POSTGRESQL_HOST:$TEST_NGINX_POSTGRESQL_PORT
dbname=ngx_test user=ngx_test password=ngx_test;
}
_EOC_
View
@@ -7,11 +7,12 @@ repeat_each(2);
plan tests => repeat_each() * (blocks() * 2);
+$ENV{TEST_NGINX_POSTGRESQL_HOST} ||= '127.0.0.1';
$ENV{TEST_NGINX_POSTGRESQL_PORT} ||= 5432;
our $http_config = <<'_EOC_';
upstream database {
- postgres_server 127.0.0.1:$TEST_NGINX_POSTGRESQL_PORT
+ postgres_server $TEST_NGINX_POSTGRESQL_HOST:$TEST_NGINX_POSTGRESQL_PORT
dbname=ngx_test user=ngx_test password=ngx_test;
}
_EOC_
View
@@ -7,11 +7,12 @@ repeat_each(2);
plan tests => repeat_each() * blocks();
+$ENV{TEST_NGINX_POSTGRESQL_HOST} ||= '127.0.0.1';
$ENV{TEST_NGINX_POSTGRESQL_PORT} ||= 5432;
our $http_config = <<'_EOC_';
upstream database {
- postgres_server 127.0.0.1:$TEST_NGINX_POSTGRESQL_PORT
+ postgres_server $TEST_NGINX_POSTGRESQL_HOST:$TEST_NGINX_POSTGRESQL_PORT
dbname=ngx_test user=ngx_test password=ngx_test;
}
_EOC_
@@ -37,7 +38,7 @@ GET /postgres
=== TEST 2: wrong credentials
--- http_config
upstream database {
- postgres_server 127.0.0.1:$TEST_NGINX_POSTGRESQL_PORT
+ postgres_server $TEST_NGINX_POSTGRESQL_HOST:$TEST_NGINX_POSTGRESQL_PORT
dbname=ngx_test user=ngx_test password=wrong_pass;
}
--- config
@@ -55,7 +56,7 @@ GET /postgres
=== TEST 3: no database
--- http_config
upstream database {
- postgres_server 127.0.0.1:1 dbname=ngx_test
+ postgres_server $TEST_NGINX_POSTGRESQL_HOST:1 dbname=ngx_test
user=ngx_test password=ngx_test;
}
--- config
View
@@ -7,11 +7,12 @@ repeat_each(2);
plan tests => repeat_each() * (blocks() * 3);
+$ENV{TEST_NGINX_POSTGRESQL_HOST} ||= '127.0.0.1';
$ENV{TEST_NGINX_POSTGRESQL_PORT} ||= 5432;
our $http_config = <<'_EOC_';
upstream database {
- postgres_server 127.0.0.1:$TEST_NGINX_POSTGRESQL_PORT
+ postgres_server $TEST_NGINX_POSTGRESQL_HOST:$TEST_NGINX_POSTGRESQL_PORT
dbname=ngx_test user=ngx_test password=ngx_test;
}
_EOC_
View
@@ -7,11 +7,12 @@ repeat_each(2);
plan tests => repeat_each() * (blocks() * 3);
+$ENV{TEST_NGINX_POSTGRESQL_HOST} ||= '127.0.0.1';
$ENV{TEST_NGINX_POSTGRESQL_PORT} ||= 5432;
our $http_config = <<'_EOC_';
upstream database {
- postgres_server 127.0.0.1:$TEST_NGINX_POSTGRESQL_PORT
+ postgres_server $TEST_NGINX_POSTGRESQL_HOST:$TEST_NGINX_POSTGRESQL_PORT
dbname=ngx_test user=ngx_test password=ngx_test;
}
_EOC_
View
@@ -7,11 +7,12 @@ repeat_each(2);
plan tests => repeat_each() * (blocks() * 3 - 2 * 2);
+$ENV{TEST_NGINX_POSTGRESQL_HOST} ||= '127.0.0.1';
$ENV{TEST_NGINX_POSTGRESQL_PORT} ||= 5432;
our $http_config = <<'_EOC_';
upstream database {
- postgres_server 127.0.0.1:$TEST_NGINX_POSTGRESQL_PORT
+ postgres_server $TEST_NGINX_POSTGRESQL_HOST:$TEST_NGINX_POSTGRESQL_PORT
dbname=ngx_test user=ngx_test password=ngx_test;
}
_EOC_
View
@@ -7,11 +7,12 @@ repeat_each(2);
plan tests => repeat_each() * (blocks() * 3 - 4 * 2);
+$ENV{TEST_NGINX_POSTGRESQL_HOST} ||= '127.0.0.1';
$ENV{TEST_NGINX_POSTGRESQL_PORT} ||= 5432;
our $http_config = <<'_EOC_';
upstream database {
- postgres_server 127.0.0.1:$TEST_NGINX_POSTGRESQL_PORT
+ postgres_server $TEST_NGINX_POSTGRESQL_HOST:$TEST_NGINX_POSTGRESQL_PORT
dbname=ngx_test user=ngx_test password=ngx_test;
}
_EOC_
View
@@ -7,11 +7,12 @@ repeat_each(1);
plan tests => repeat_each() * (blocks() * 3);
+$ENV{TEST_NGINX_POSTGRESQL_HOST} ||= '127.0.0.1';
$ENV{TEST_NGINX_POSTGRESQL_PORT} ||= 5432;
our $http_config = <<'_EOC_';
upstream database {
- postgres_server 127.0.0.1:$TEST_NGINX_POSTGRESQL_PORT
+ postgres_server $TEST_NGINX_POSTGRESQL_HOST:$TEST_NGINX_POSTGRESQL_PORT
dbname=ngx_test user=ngx_test password=ngx_test;
}
_EOC_
View
@@ -7,11 +7,12 @@ repeat_each(1);
plan tests => repeat_each() * (blocks() * 3);
+$ENV{TEST_NGINX_POSTGRESQL_HOST} ||= '127.0.0.1';
$ENV{TEST_NGINX_POSTGRESQL_PORT} ||= 5432;
our $http_config = <<'_EOC_';
upstream database {
- postgres_server 127.0.0.1:$TEST_NGINX_POSTGRESQL_PORT
+ postgres_server $TEST_NGINX_POSTGRESQL_HOST:$TEST_NGINX_POSTGRESQL_PORT
dbname=ngx_test user=ngx_test password=ngx_test;
}
_EOC_
View
@@ -7,11 +7,12 @@ repeat_each(2);
plan tests => repeat_each() * (blocks() * 2 + 1 * 1);
+$ENV{TEST_NGINX_POSTGRESQL_HOST} ||= '127.0.0.1';
$ENV{TEST_NGINX_POSTGRESQL_PORT} ||= 5432;
our $http_config = <<'_EOC_';
upstream database {
- postgres_server 127.0.0.1:$TEST_NGINX_POSTGRESQL_PORT
+ postgres_server $TEST_NGINX_POSTGRESQL_HOST:$TEST_NGINX_POSTGRESQL_PORT
dbname=ngx_test user=ngx_test password=ngx_test;
}
_EOC_
View
@@ -7,11 +7,12 @@ repeat_each(2);
plan tests => repeat_each() * (blocks() * 3);
+$ENV{TEST_NGINX_POSTGRESQL_HOST} ||= '127.0.0.1';
$ENV{TEST_NGINX_POSTGRESQL_PORT} ||= 5432;
our $http_config = <<'_EOC_';
upstream database {
- postgres_server 127.0.0.1:$TEST_NGINX_POSTGRESQL_PORT
+ postgres_server $TEST_NGINX_POSTGRESQL_HOST:$TEST_NGINX_POSTGRESQL_PORT
dbname=ngx_test user=ngx_test password=ngx_test;
}
_EOC_
@@ -23,7 +24,7 @@ __DATA__
=== TEST 1: sanity
--- http_config
upstream database {
- postgres_server 127.0.0.1:$TEST_NGINX_POSTGRESQL_PORT
+ postgres_server $TEST_NGINX_POSTGRESQL_HOST:$TEST_NGINX_POSTGRESQL_PORT
dbname=ngx_test user=ngx_test password=ngx_test;
postgres_keepalive off;
}
View
@@ -7,11 +7,12 @@ repeat_each(2);
plan tests => repeat_each() * (blocks() * 3 + 1 * 4 + 1 * 1 - 5 * 2);
+$ENV{TEST_NGINX_POSTGRESQL_HOST} ||= '127.0.0.1';
$ENV{TEST_NGINX_POSTGRESQL_PORT} ||= 5432;
our $http_config = <<'_EOC_';
upstream database {
- postgres_server 127.0.0.1:$TEST_NGINX_POSTGRESQL_PORT
+ postgres_server $TEST_NGINX_POSTGRESQL_HOST:$TEST_NGINX_POSTGRESQL_PORT
dbname=ngx_test user=ngx_test password=ngx_test;
}
_EOC_

0 comments on commit 15d137c

Please sign in to comment.