Skip to content

Commit 4368778

Browse files
committed
Revert tests
1 parent 3ced4fc commit 4368778

File tree

8 files changed

+30
-191
lines changed

8 files changed

+30
-191
lines changed

Diff for: examples/default-vhost__php-fpm/integration-test.sh

+2-23
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,17 @@ set -e
44
set -u
55
set -o pipefail
66

7-
while_retry() {
8-
local expect="${1}"
9-
local url="${2}"
10-
local header="${3:-}"
11-
local output
12-
13-
count=0
14-
retry=60
15-
while ! output="$( curl --fail -sS -k -L "${url}" -H "${header}" 2>/dev/null | grep -A 10 "${expect}" )"; do
16-
if [ "${count}" = "${retry}" ]; then
17-
echo "[FAILED] curl --fail -sS -k -L \"${url}\" -H \"${header}\" | grep \"${expect}\""
18-
curl --fail -sS -k -L "${url}" -H "${header}" | grep -A 10 "${expect}" || true
19-
return 1
20-
fi
21-
count=$(( count + 1 ))
22-
sleep 1
23-
done
24-
echo "${output}"
25-
}
26-
277
docker-compose build
288
docker-compose up -d
9+
sleep 10
2910

30-
if ! output="$( while_retry '[OK]' "http://localhost:8000" )"; then
11+
if ! curl http://localhost:8000 | grep '[OK]'; then
3112
docker-compose logs || true
3213
docker-compose stop || true
3314
docker-compose rm -f || true
34-
echo "${output}"
3515
exit 1
3616
fi
3717

3818
docker-compose logs || true
3919
docker-compose stop || true
4020
docker-compose rm -f || true
41-
echo "${output}"

Diff for: examples/default-vhost__php-fpm__ssl/integration-test.sh

+4-28
Original file line numberDiff line numberDiff line change
@@ -4,47 +4,23 @@ set -e
44
set -u
55
set -o pipefail
66

7-
while_retry() {
8-
local expect="${1}"
9-
local url="${2}"
10-
local header="${3:-}"
11-
local output
12-
13-
count=0
14-
retry=60
15-
while ! output="$( curl --fail -sS -k -L "${url}" -H "${header}" 2>/dev/null | grep -A 10 "${expect}" )"; do
16-
if [ "${count}" = "${retry}" ]; then
17-
echo "[FAILED] curl --fail -sS -k -L \"${url}\" -H \"${header}\" | grep \"${expect}\""
18-
curl --fail -sS -k -L "${url}" -H "${header}" | grep -A 10 "${expect}" || true
19-
return 1
20-
fi
21-
count=$(( count + 1 ))
22-
sleep 1
23-
done
24-
echo "${output}"
25-
}
26-
277
docker-compose build
288
docker-compose up -d
9+
sleep 10
2910

30-
if ! output1="$( while_retry '[OK]' "http://localhost:8000" )"; then
11+
if ! curl http://localhost:8000 | grep '[OK]'; then
3112
docker-compose logs || true
3213
docker-compose stop || true
3314
docker-compose rm -f || true
34-
echo "${output1}"
3515
exit 1
3616
fi
37-
38-
if ! output2="$( while_retry '[OK]' "https://localhost:8443" )"; then
17+
if ! curl -k https://localhost:8443 | grep '[OK]'; then
3918
docker-compose logs || true
4019
docker-compose stop || true
4120
docker-compose rm -f || true
42-
echo "${output2}"
4321
exit 1
4422
fi
23+
4524
docker-compose logs || true
4625
docker-compose stop || true
4726
docker-compose rm -f || true
48-
49-
echo "${output1}"
50-
echo "${output2}"

Diff for: examples/default-vhost__reverse-proxy__node/integration-test.sh

+8-23
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,23 @@ set -e
44
set -u
55
set -o pipefail
66

7-
while_retry() {
8-
local expect="${1}"
9-
local url="${2}"
10-
local header="${3:-}"
11-
local output
12-
13-
count=0
14-
retry=60
15-
while ! output="$( curl --fail -sS -k -L "${url}" -H "${header}" 2>/dev/null | grep -A 10 "${expect}" )"; do
16-
if [ "${count}" = "${retry}" ]; then
17-
echo "[FAILED] curl --fail -sS -k -L \"${url}\" -H \"${header}\" | grep \"${expect}\""
18-
curl --fail -sS -k -L "${url}" -H "${header}" | grep -A 10 "${expect}" || true
19-
return 1
20-
fi
21-
count=$(( count + 1 ))
22-
sleep 1
23-
done
24-
echo "${output}"
25-
}
26-
277
docker-compose build
288
docker-compose up -d
9+
sleep 10
2910

30-
if ! output="$( while_retry '[OK]' "http://localhost:8000" )"; then
11+
if ! curl http://localhost:8000 | grep '[OK]'; then
12+
docker-compose logs || true
13+
docker-compose stop || true
14+
docker-compose rm -f || true
15+
exit 1
16+
fi
17+
if ! curl -k https://localhost:8443 | grep '[OK]'; then
3118
docker-compose logs || true
3219
docker-compose stop || true
3320
docker-compose rm -f || true
34-
echo "${output}"
3521
exit 1
3622
fi
3723

3824
docker-compose logs || true
3925
docker-compose stop || true
4026
docker-compose rm -f || true
41-
echo "${output}"

Diff for: examples/default-vhost__reverse-proxy__python/docker-compose.yml

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ services:
1313
environment:
1414
- MAIN_VHOST_BACKEND=conf:rproxy:http:python:3000
1515
- MAIN_VHOST_SSL_TYPE=both
16-
- DEBUG_ENTRYPOINT=4
1716
ports:
1817
- "8000:80"
1918
- "8443:443"

Diff for: examples/default-vhost__reverse-proxy__python/integration-test.sh

+4-27
Original file line numberDiff line numberDiff line change
@@ -4,46 +4,23 @@ set -e
44
set -u
55
set -o pipefail
66

7-
while_retry() {
8-
local expect="${1}"
9-
local url="${2}"
10-
local header="${3:-}"
11-
local output
12-
13-
count=0
14-
retry=1200
15-
printf "[TESTING] %s" "curl --fail -sS -k -L \"${url}\" -H \"${header}\" | grep \"${expect}\" "
16-
while ! output="$( curl --fail -sS -k -L "${url}" -H "${header}" 2>/dev/null | grep -A 10 "${expect}" )"; do
17-
printf "."
18-
if [ "${count}" = "${retry}" ]; then
19-
printf "\\n"
20-
echo "[FAILED] curl --fail -sS -k -L \"${url}\" -H \"${header}\" | grep \"${expect}\""
21-
curl --fail -sS -k -L "${url}" -H "${header}" | grep -A 10 "${expect}" || true
22-
return 1
23-
fi
24-
count=$(( count + 1 ))
25-
sleep 1
26-
done
27-
printf "\\n"
28-
echo "${output}"
29-
}
30-
317
docker-compose build
328
docker-compose up -d
9+
sleep 10
3310

34-
if ! while_retry '[OK]' "http://localhost:8000"; then
11+
if ! curl http://localhost:8000 | grep '[OK]'; then
3512
docker-compose logs || true
3613
docker-compose stop || true
3714
docker-compose rm -f || true
3815
exit 1
3916
fi
40-
41-
if ! while_retry '[OK]' "https://localhost:8443"; then
17+
if ! curl -k https://localhost:8443 | grep '[OK]'; then
4218
docker-compose logs || true
4319
docker-compose stop || true
4420
docker-compose rm -f || true
4521
exit 1
4622
fi
23+
4724
docker-compose logs || true
4825
docker-compose stop || true
4926
docker-compose rm -f || true

Diff for: examples/default-vhost__static-files/integration-test.sh

+2-23
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,17 @@ set -e
44
set -u
55
set -o pipefail
66

7-
while_retry() {
8-
local expect="${1}"
9-
local url="${2}"
10-
local header="${3:-}"
11-
local output
12-
13-
count=0
14-
retry=60
15-
while ! output="$( curl --fail -sS -k -L "${url}" -H "${header}" 2>/dev/null | grep -A 10 "${expect}" )"; do
16-
if [ "${count}" = "${retry}" ]; then
17-
echo "[FAILED] curl --fail -sS -k -L \"${url}\" -H \"${header}\" | grep \"${expect}\""
18-
curl --fail -sS -k -L "${url}" -H "${header}" | grep -A 10 "${expect}" || true
19-
return 1
20-
fi
21-
count=$(( count + 1 ))
22-
sleep 1
23-
done
24-
echo "${output}"
25-
}
26-
277
docker-compose build
288
docker-compose up -d
9+
sleep 10
2910

30-
if ! output="$( while_retry '[OK]' "http://localhost:8000" )"; then
11+
if ! curl http://localhost:8000 | grep '[OK]'; then
3112
docker-compose logs || true
3213
docker-compose stop || true
3314
docker-compose rm -f || true
34-
echo "${output}"
3515
exit 1
3616
fi
3717

3818
docker-compose logs || true
3919
docker-compose stop || true
4020
docker-compose rm -f || true
41-
echo "${output}"

Diff for: examples/mass-vhost__php-fpm__ssl/integration-test.sh

+5-33
Original file line numberDiff line numberDiff line change
@@ -4,64 +4,36 @@ set -e
44
set -u
55
set -o pipefail
66

7-
while_retry() {
8-
local expect="${1}"
9-
local url="${2}"
10-
local header="${3:-}"
11-
local output
12-
13-
count=0
14-
retry=60
15-
while ! output="$( curl --fail -sS -k -L "${url}" -H "${header}" 2>/dev/null | grep -A 10 "${expect}" )"; do
16-
if [ "${count}" = "${retry}" ]; then
17-
echo "[FAILED] curl --fail -sS -k -L \"${url}\" -H \"${header}\" | grep \"${expect}\""
18-
curl --fail -sS -k -L "${url}" -H "${header}" | grep -A 10 "${expect}" || true
19-
return 1
20-
fi
21-
count=$(( count + 1 ))
22-
sleep 1
23-
done
24-
echo "${output}"
25-
}
26-
277
docker-compose build
288
docker-compose up -d
9+
sleep 10
2910

30-
if ! output1="$( while_retry '[OK]' "http://localhost:8000" "Host:sample.loc" )"; then
11+
if ! curl http://localhost:8000 -H 'Host:sample.loc' | grep '[OK]'; then
3112
docker-compose logs || true
3213
docker-compose stop || true
3314
docker-compose rm -f || true
34-
echo "${output1}"
3515
exit 1
3616
fi
37-
if ! output2="$( while_retry '[OK]' "https://localhost:8443" "Host:sample.loc" )"; then
17+
if ! curl -k https://localhost:8443 -H 'Host:sample.loc' | grep '[OK]'; then
3818
docker-compose logs || true
3919
docker-compose stop || true
4020
docker-compose rm -f || true
41-
echo "${output2}"
4221
exit 1
4322
fi
4423

45-
if ! output3="$( while_retry '[OK]' "http://localhost:8000" "Host:test.loc" )"; then
24+
if ! curl http://localhost:8000 -H 'Host:test.loc' | grep '[OK]'; then
4625
docker-compose logs || true
4726
docker-compose stop || true
4827
docker-compose rm -f || true
49-
echo "${output3}"
5028
exit 1
5129
fi
52-
if ! output4="$( while_retry '[OK]' "https://localhost:8443" "Host:test.loc" )"; then
30+
if ! curl -k https://localhost:8443 -H 'Host:test.loc' | grep '[OK]'; then
5331
docker-compose logs || true
5432
docker-compose stop || true
5533
docker-compose rm -f || true
56-
echo "${output4}"
5734
exit 1
5835
fi
5936

6037
docker-compose logs || true
6138
docker-compose stop || true
6239
docker-compose rm -f || true
63-
64-
echo "${output1}"
65-
echo "${output2}"
66-
echo "${output3}"
67-
echo "${output4}"

Diff for: examples/mass-vhost__reverse-proxy__ssl/integration-test.sh

+5-33
Original file line numberDiff line numberDiff line change
@@ -4,64 +4,36 @@ set -e
44
set -u
55
set -o pipefail
66

7-
while_retry() {
8-
local expect="${1}"
9-
local url="${2}"
10-
local header="${3:-}"
11-
local output
12-
13-
count=0
14-
retry=60
15-
while ! output="$( curl --fail -sS -k -L "${url}" -H "${header}" 2>/dev/null | grep -A 10 "${expect}" )"; do
16-
if [ "${count}" = "${retry}" ]; then
17-
echo "[FAILED] curl --fail -sS -k -L \"${url}\" -H \"${header}\" | grep \"${expect}\""
18-
curl --fail -sS -k -L "${url}" -H "${header}" | grep -A 10 "${expect}" || true
19-
return 1
20-
fi
21-
count=$(( count + 1 ))
22-
sleep 1
23-
done
24-
echo "${output}"
25-
}
26-
277
docker-compose build
288
docker-compose up -d
9+
sleep 10
2910

30-
if ! output1="$( while_retry '[OK]' "http://localhost:8000" "Host:node.loc" )"; then
11+
if ! curl http://localhost:8000 -H 'Host:node.loc' | grep '[OK]'; then
3112
docker-compose logs || true
3213
docker-compose stop || true
3314
docker-compose rm -f || true
34-
echo "${output1}"
3515
exit 1
3616
fi
37-
if ! output2="$( while_retry '[OK]' "https://localhost:8443" "Host:node.loc" )"; then
17+
if ! curl -k https://localhost:8443 -H 'Host:node.loc' | grep '[OK]'; then
3818
docker-compose logs || true
3919
docker-compose stop || true
4020
docker-compose rm -f || true
41-
echo "${output2}"
4221
exit 1
4322
fi
4423

45-
if ! output3="$( while_retry '[OK]' "http://localhost:8000" "Host:php.loc" )"; then
24+
if ! curl http://localhost:8000 -H 'Host:php.loc' | grep '[OK]'; then
4625
docker-compose logs || true
4726
docker-compose stop || true
4827
docker-compose rm -f || true
49-
echo "${output3}"
5028
exit 1
5129
fi
52-
if ! output4="$( while_retry '[OK]' "https://localhost:8443" "Host:php.loc" )"; then
30+
if ! curl -k https://localhost:8443 -H 'Host:php.loc' | grep '[OK]'; then
5331
docker-compose logs || true
5432
docker-compose stop || true
5533
docker-compose rm -f || true
56-
echo "${output4}"
5734
exit 1
5835
fi
5936

6037
docker-compose logs || true
6138
docker-compose stop || true
6239
docker-compose rm -f || true
63-
64-
echo "${output1}"
65-
echo "${output2}"
66-
echo "${output3}"
67-
echo "${output4}"

0 commit comments

Comments
 (0)