-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f83b0cc
commit ca3d31b
Showing
1 changed file
with
15 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,18 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
./oauth-mock-server | ||
# Start the OAuth mock server in the background | ||
/oauth-mock-server & | ||
|
||
# Wait for the server to be ready | ||
for i in $(seq 1 30); do | ||
if curl -s http://localhost:${PORT:-8080}/authorize > /dev/null; then | ||
echo "OAuth mock server is up and running" | ||
exit 0 | ||
fi | ||
echo "Waiting for OAuth mock server to be ready..." | ||
sleep 1 | ||
done | ||
|
||
echo "Failed to start OAuth mock server" | ||
exit 1 |