remote-config: use one port for testing, against a new python server (#1293)
* remote-config: use one port for testing, against a new python-based server * properly reference remote configu urls
This commit is contained in:
@@ -32,13 +32,7 @@
|
||||
: ${PRIMARY_PORT:?"Set PRIMARY_PORT"}
|
||||
: ${SECONDARY_PORT:?"Set SECONDARY_PORT"}
|
||||
: ${CONTROLLER_PORT:?"Set CONTROLLER_PORT"}
|
||||
: ${RCPORT1:?"Set RCPORT1"}
|
||||
: ${RCPORT2:?"Set RCPORT2"}
|
||||
: ${RCPORT2:?"Set RCPORT3"}
|
||||
: ${RCPORT4:?"Set RCPORT4"}
|
||||
: ${RCPORT5:?"Set RCPORT5"}
|
||||
: ${RCPORT6:?"Set RCPORT6"}
|
||||
: ${RCPORT7:?"Set RCPORT7"}
|
||||
: ${RCPORT:?"Set RCPORT"}
|
||||
: ${MOD_PAGESPEED_DIR:?"Set MOD_PAGESPEED_DIR"}
|
||||
: ${NGINX_EXECUTABLE:?"Set NGINX_EXECUTABLE"}
|
||||
: ${PAGESPEED_TEST_HOST:?"Set PAGESPEED_TEST_HOST"}
|
||||
@@ -229,13 +223,7 @@ cat $PAGESPEED_CONF_TEMPLATE \
|
||||
| sed 's#@@CONTROLLER@@#'"$CONTROLLER"'#' \
|
||||
| sed 's#@@NATIVE_FETCHER@@#'"$NATIVE_FETCHER"'#' \
|
||||
| sed 's#@@RESOLVER@@#'"$RESOLVER"'#' \
|
||||
| sed 's#@@RCPORT1@@#'"$RCPORT1"'#' \
|
||||
| sed 's#@@RCPORT2@@#'"$RCPORT2"'#' \
|
||||
| sed 's#@@RCPORT3@@#'"$RCPORT3"'#' \
|
||||
| sed 's#@@RCPORT4@@#'"$RCPORT4"'#' \
|
||||
| sed 's#@@RCPORT5@@#'"$RCPORT5"'#' \
|
||||
| sed 's#@@RCPORT6@@#'"$RCPORT6"'#' \
|
||||
| sed 's#@@RCPORT7@@#'"$RCPORT7"'#' \
|
||||
| sed 's#@@RCPORT@@#'"$RCPORT"'#' \
|
||||
| sed 's#@@PAGESPEED_TEST_HOST@@#'"$PAGESPEED_TEST_HOST"'#' \
|
||||
>> $PAGESPEED_CONF
|
||||
# make sure we substituted all the variables
|
||||
|
||||
@@ -1221,7 +1221,7 @@ http {
|
||||
listen [::]:@@SECONDARY_PORT@@;
|
||||
server_name remote-config.example.com;
|
||||
pagespeed FileCachePath "@@SECONDARY_CACHE@@";
|
||||
pagespeed RemoteConfigurationUrl "http://127.0.0.1:@@RCPORT1@@/remote.cfg";
|
||||
pagespeed RemoteConfigurationUrl "http://127.0.0.1:@@RCPORT@@/rcport1";
|
||||
pagespeed RemoteConfigurationTimeoutMs 1500;
|
||||
}
|
||||
server {
|
||||
@@ -1229,7 +1229,7 @@ http {
|
||||
listen [::]:@@SECONDARY_PORT@@;
|
||||
server_name remote-config-partially-invalid.example.com;
|
||||
pagespeed FileCachePath "@@SECONDARY_CACHE@@";
|
||||
pagespeed RemoteConfigurationUrl "http://127.0.0.1:@@RCPORT2@@/remote.cfg";
|
||||
pagespeed RemoteConfigurationUrl "http://127.0.0.1:@@RCPORT@@/rcport2";
|
||||
pagespeed RemoteConfigurationTimeoutMs 1500;
|
||||
}
|
||||
server {
|
||||
@@ -1237,7 +1237,7 @@ http {
|
||||
listen [::]:@@SECONDARY_PORT@@;
|
||||
server_name remote-config-invalid.example.com;
|
||||
pagespeed FileCachePath "@@SECONDARY_CACHE@@";
|
||||
pagespeed RemoteConfigurationUrl "http://127.0.0.1:@@RCPORT3@@/remote.cfg";
|
||||
pagespeed RemoteConfigurationUrl "http://127.0.0.1:@@RCPORT@@/rcport3";
|
||||
pagespeed RemoteConfigurationTimeoutMs 1500;
|
||||
}
|
||||
server {
|
||||
@@ -1245,7 +1245,7 @@ http {
|
||||
listen [::]:@@SECONDARY_PORT@@;
|
||||
server_name remote-config-failed-fetch.example.com;
|
||||
pagespeed FileCachePath "@@SECONDARY_CACHE@@";
|
||||
pagespeed RemoteConfigurationUrl "http://127.0.0.1:@@RCPORT5@@/remote.cfg";
|
||||
pagespeed RemoteConfigurationUrl "http://127.0.0.1:@@RCPORT@@/rcport5";
|
||||
pagespeed RemoteConfigurationTimeoutMs 1500;
|
||||
}
|
||||
server {
|
||||
@@ -1253,7 +1253,7 @@ http {
|
||||
listen [::]:@@SECONDARY_PORT@@;
|
||||
server_name remote-config-slow-fetch.example.com;
|
||||
pagespeed FileCachePath "@@SECONDARY_CACHE@@";
|
||||
pagespeed RemoteConfigurationUrl "http://127.0.0.1:@@RCPORT6@@/remote.cfg";
|
||||
pagespeed RemoteConfigurationUrl "http://127.0.0.1:@@RCPORT@@/rcport6";
|
||||
pagespeed RemoteConfigurationTimeoutMs 1500;
|
||||
}
|
||||
server {
|
||||
@@ -1261,7 +1261,39 @@ http {
|
||||
listen [::]:@@SECONDARY_PORT@@;
|
||||
server_name remote-config-experiment.example.com;
|
||||
pagespeed FileCachePath "@@SECONDARY_CACHE@@";
|
||||
pagespeed RemoteConfigurationUrl "http://127.0.0.1:@@RCPORT7@@/remote.cfg";
|
||||
pagespeed RemoteConfigurationUrl "http://127.0.0.1:@@RCPORT@@/rcport7";
|
||||
pagespeed RemoteConfigurationTimeoutMs 1500;
|
||||
}
|
||||
server {
|
||||
listen @@SECONDARY_PORT@@;
|
||||
listen [::]:@@SECONDARY_PORT@@;
|
||||
server_name remote-config-slightly-slow-fetch.example.com;
|
||||
pagespeed FileCachePath "@@SECONDARY_CACHE@@";
|
||||
pagespeed RemoteConfigurationUrl "http://127.0.0.1:@@RCPORT@@/rcport8";
|
||||
pagespeed RemoteConfigurationTimeoutMs 1500;
|
||||
}
|
||||
server {
|
||||
listen @@SECONDARY_PORT@@;
|
||||
listen [::]:@@SECONDARY_PORT@@;
|
||||
server_name remote-config-slightly-slow-expired-fetch.example.com;
|
||||
pagespeed FileCachePath "@@SECONDARY_CACHE@@";
|
||||
pagespeed RemoteConfigurationUrl "http://127.0.0.1:@@RCPORT@@/rcport9";
|
||||
pagespeed RemoteConfigurationTimeoutMs 1500;
|
||||
}
|
||||
server {
|
||||
listen @@SECONDARY_PORT@@;
|
||||
listen [::]:@@SECONDARY_PORT@@;
|
||||
server_name remote-config-forbidden.example.com;
|
||||
pagespeed FileCachePath "@@SECONDARY_CACHE@@";
|
||||
pagespeed RemoteConfigurationUrl "http://127.0.0.1:@@RCPORT@@/rcport10";
|
||||
pagespeed RemoteConfigurationTimeoutMs 1500;
|
||||
}
|
||||
server {
|
||||
listen @@SECONDARY_PORT@@;
|
||||
listen [::]:@@SECONDARY_PORT@@;
|
||||
server_name remote-config-initially-forbidden.example.com;
|
||||
pagespeed FileCachePath "@@SECONDARY_CACHE@@";
|
||||
pagespeed RemoteConfigurationUrl "http://127.0.0.1:@@RCPORT@@/rcport11";
|
||||
pagespeed RemoteConfigurationTimeoutMs 1500;
|
||||
}
|
||||
|
||||
|
||||
+2
-14
@@ -57,13 +57,7 @@ MOD_PAGESPEED_DIR="$3"
|
||||
NGINX_EXECUTABLE="$4"
|
||||
PAGESPEED_TEST_HOST="$5"
|
||||
CONTROLLER_PORT=8053
|
||||
RCPORT1=9991
|
||||
RCPORT2=9992
|
||||
RCPORT3=9993
|
||||
RCPORT4=9994
|
||||
RCPORT5=9995
|
||||
RCPORT6=9996
|
||||
RCPORT7=9997
|
||||
RCPORT=9991
|
||||
|
||||
this_dir="$( cd $(dirname "$0") && pwd)"
|
||||
|
||||
@@ -76,13 +70,7 @@ function run_test_checking_failure() {
|
||||
PAGESPEED_TEST_HOST="$PAGESPEED_TEST_HOST" \
|
||||
RUN_TESTS="$RUN_TESTS" \
|
||||
CONTROLLER_PORT="$CONTROLLER_PORT" \
|
||||
RCPORT1="$RCPORT1" \
|
||||
RCPORT2="$RCPORT2" \
|
||||
RCPORT3="$RCPORT3" \
|
||||
RCPORT4="$RCPORT4" \
|
||||
RCPORT5="$RCPORT5" \
|
||||
RCPORT6="$RCPORT6" \
|
||||
RCPORT7="$RCPORT7" \
|
||||
RCPORT="$RCPORT" \
|
||||
bash "$this_dir/nginx_system_test.sh"
|
||||
STATUS=$?
|
||||
echo "With $@ setup."
|
||||
|
||||
Reference in New Issue
Block a user