Commit 0f9abcbd authored by Vasili Novikov's avatar Vasili Novikov
Browse files

Merge branch 'add-curl-test' into 'dev'

Add a curl test

See merge request memri/pod!170
parents 2043fd5c 1955309c
Showing with 26 additions and 1 deletion
+26 -1
......@@ -17,6 +17,7 @@ test:
- if grep --recursive '::{' src/; then false; fi
- cargo audit
- cargo test
- ./tests/test_curl.sh
pages:
stage: docs
......
......@@ -7,8 +7,10 @@ if ! test -e Cargo.toml; then
exit 1
fi
cargo build
RUST_LOG=pod=debug,info \
exec cargo run -- \
exec target/debug/pod \
--owners=ANY \
--insecure-non-tls=0.0.0.0 \
--insecure-http-headers \
......
#!/usr/bin/env bash
set -euETo pipefail
#### This script tests that Pod can respond to GET /version request
#### Start Pod
./examples/run_development.sh --port=4956 &
pid=$!
for attempt in {1..30}; do
#### Try to get a successful response to /version
if curl localhost:4956/version 1>/dev/null 2>&1; then
echo "Got a successful response, exiting"
kill $pid
exit 0
else
sleep 1s
fi
done
echo "Failed to get a response from Pod"
exit 1
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment