Skip to content

Commit

Permalink
Use explicit PIDs instead of jobspecs in E2E tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TheJokr committed Nov 3, 2024
1 parent f1bda0f commit 5ab9215
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions ci/lighttpd.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
server.modules = ("mod_auth", "mod_fastcgi")

server.pid-file = "/tmp/lighttpd-ci.pid"
server.port = 8080
server.document-root = "ci"

Expand Down
8 changes: 5 additions & 3 deletions ci/test-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,22 @@ echo -e '::endgroup::\n'

declare -A servers=(
[nginx]="nginx -c ${PWD}/ci/nginx.conf"
[Apache httpd]="apache2 -d ci -f apache2.conf -D FOREGROUND"
[apache2]="apache2 -d ci -f apache2.conf -D FOREGROUND"
[lighttpd]="lighttpd -f ci/lighttpd.conf -D"
)
for srv in "${!servers[@]}"; do
echo "::group::Test with ${srv}"
RUST_LOG=trace target/debug/examples/hello-cgi 2> "e2e-logs/hello-cgi-${srv}.log" &
fcgi_pid="$!"

${servers["$srv"]} 2> "e2e-logs/${srv}.log" &
newman run ci/e2e.postman_collection --env-var 'base_url=localhost:8080' \
--color on --timeout 600000

kill %2 %1
kill $(cat "/tmp/${srv}-ci.pid") "$fcgi_pid"
wait -f
echo '::endgroup::'

# Avoid spurious socket errors between different servers
sleep 1s
sleep 2s
done

0 comments on commit 5ab9215

Please sign in to comment.