Skip to content

Commit 12063e9

Browse files
committed
Ignore trailing slash for integration tests and increase wait timeout
1 parent 9a5b910 commit 12063e9

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

.github/workflows/ci.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ jobs:
129129
- run: docker build -f tests/integration/Dockerfile-basics tests/integration/
130130
- run: docker run -d -p 8080:8080 -v "$PWD/composer.json":/app/composer.json $(docker images -q | head -n1)
131131
- run: docker run -d --net=host -v "$PWD/tests/integration/":/home/framework-x/ -v "$PWD"/tests/integration/${{ matrix.config.path }}:/etc/nginx/conf.d/default.conf nginx:stable-alpine
132-
- run: bash tests/await.bash http://localhost
133-
- run: bash tests/integration.bash http://localhost
132+
- run: bash tests/await.bash http://localhost/
133+
- run: bash tests/integration.bash http://localhost/
134134
- run: docker stop $(docker ps -qn2)
135135
- run: docker logs $(docker ps -qn1)
136136
if: ${{ always() }}
@@ -159,8 +159,8 @@ jobs:
159159
- run: composer install -d tests/integration/
160160
- run: docker run -d -v "$PWD/tests/integration/":/home/framework-x/ php:${{ matrix.php }}-fpm
161161
- run: docker run -d -p 80:80 --link $(docker ps -qn1):php -v "$PWD/tests/integration/":/home/framework-x/ -v "$PWD"/tests/integration/nginx-fpm.conf:/etc/nginx/conf.d/default.conf nginx:stable-alpine
162-
- run: bash tests/await.bash http://localhost
163-
- run: bash tests/integration.bash http://localhost
162+
- run: bash tests/await.bash http://localhost/
163+
- run: bash tests/integration.bash http://localhost/
164164
- run: docker logs $(docker ps -qn1)
165165
if: ${{ always() }}
166166

@@ -185,8 +185,8 @@ jobs:
185185
php-version: ${{ matrix.php }}
186186
- run: composer install -d tests/integration/
187187
- run: docker run -d -p 80:80 -v "$PWD/tests/integration/":/home/framework-x/ php:${{ matrix.php }}-apache sh -c "rmdir /var/www/html;ln -s /home/framework-x/public /var/www/html;ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled; apache2-foreground"
188-
- run: bash tests/await.bash http://localhost
189-
- run: bash tests/integration.bash http://localhost
188+
- run: bash tests/await.bash http://localhost/
189+
- run: bash tests/integration.bash http://localhost/
190190
- run: docker logs $(docker ps -qn1)
191191
if: ${{ always() }}
192192

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ your installation like this:
136136

137137
```bash
138138
$ php tests/integration/public/index.php
139-
$ tests/integration.bash http://localhost:8080
139+
$ tests/integration.bash http://localhost:8080/
140140
```
141141

142142
## License

tests/await.bash

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
#!/bin/bash
22

3-
base=${1:-http://localhost:8080}
3+
base=${1:-http://localhost:8080/}
4+
base=${base%/}
45

5-
for i in {1..20}
6+
for i in {1..600}
67
do
78
out=$(curl -v -X PROBE $base/ 2>&1) && exit 0 || echo -n .
89
sleep 0.1

tests/integration.bash

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22

3-
base=${1:-http://localhost:8080}
3+
base=${1:-http://localhost:8080/}
4+
base=${base%/}
45
baseWithPort=$(php -r 'echo parse_url($argv[1],PHP_URL_PORT) ? $argv[1] : $argv[1] . ":80";' "$base")
56

67
n=0

0 commit comments

Comments
 (0)