-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #518 from GoogleCloudPlatform/docker-testing
Docker testing
- Loading branch information
Showing
9 changed files
with
184 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
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
apt-get update && apt-get install -y lsof | ||
|
||
# Start the server in the background | ||
gcloud beta emulators $1 start --host-port=0.0.0.0:8085 --project=blah & | ||
|
||
# Wait a few seconds for the server to start | ||
sleep 10 | ||
|
||
# Check if the server is listening on the port | ||
if lsof -i :8085 > /dev/null; then | ||
echo "Server started successfully (exiting with code 0)" | ||
kill -9 $(lsof -t -i :8085) | ||
exit 0 | ||
else | ||
echo "Server failed to start" | ||
exit 1 | ||
fi | ||
|
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
echo "Checking gsutil version" | ||
gsutil version | ||
|
||
echo "Checking kpt version" | ||
kpt version | ||
|
||
echo "Checking local-extract version" | ||
local-extract --version | ||
|
||
echo "Checking gke-gcloud-auth-plugin version" | ||
gke-gcloud-auth-plugin --version | ||
|
||
echo "Checking bq version" | ||
bq version | ||
|
||
echo "Checking bundled-python version" | ||
/usr/lib/google-cloud-sdk/platform/bundledpythonunix/bin/python --version | ||
|
||
echo "Checking cbt version" | ||
cbt version | ||
|
||
echo "Checking crc checksum for gcloud" | ||
gcloud-crc32c /usr/bin/gcloud | ||
|
||
echo "Checking kubectl version" | ||
kubectl version | ||
|
||
echo "Checking the emulators" | ||
./test-all-emulators.sh | ||
|
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
|
||
#!/bin/bash | ||
|
||
./emulator-testing.sh pubsub | ||
if [ $? -ne 0 ]; then | ||
|
||
echo "Pub/sub emulator failed to execute." | ||
exit 1 | ||
|
||
fi | ||
|
||
./emulator-testing.sh datastore | ||
if [ $? -ne 0 ]; then | ||
|
||
echo "Datastore emulator failed to execute." | ||
exit 1 | ||
|
||
fi | ||
|
||
./emulator-testing.sh bigtable | ||
if [ $? -ne 0 ]; then | ||
|
||
echo "Bigtable emulator failed to execute." | ||
exit 1 | ||
|
||
fi | ||
|
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
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
apt-get update && apt-get install -y lsof | ||
|
||
# Start the server in the background | ||
gcloud beta emulators $1 start --host-port=0.0.0.0:8085 --project=blah & | ||
|
||
# Wait a few seconds for the server to start | ||
sleep 10 | ||
|
||
# Check if the server is listening on the port | ||
if lsof -i :8085 > /dev/null; then | ||
echo "Server started successfully (exiting with code 0)" | ||
kill -9 $(lsof -t -i :8085) | ||
exit 0 | ||
else | ||
echo "Server failed to start" | ||
exit 1 | ||
fi | ||
|
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
|
||
#!/bin/bash | ||
|
||
./emulator-testing.sh pubsub | ||
if [ $? -ne 0 ]; then | ||
|
||
echo "Pub/sub emulator failed to execute." | ||
exit 1 | ||
|
||
fi | ||
|
||
./emulator-testing.sh datastore | ||
if [ $? -ne 0 ]; then | ||
|
||
echo "Datastore emulator failed to execute." | ||
exit 1 | ||
|
||
fi | ||
|
||
./emulator-testing.sh firestore | ||
if [ $? -ne 0 ]; then | ||
|
||
echo "Firestore emulator failed to execute." | ||
exit 1 | ||
|
||
fi | ||
|
||
./emulator-testing.sh spanner | ||
if [ $? -ne 0 ]; then | ||
|
||
echo "Spanner emulator failed to execute." | ||
exit 1 | ||
|
||
fi | ||
|
||
./emulator-testing.sh bigtable | ||
if [ $? -ne 0 ]; then | ||
|
||
echo "Bigtable emulator failed to execute." | ||
exit 1 | ||
|
||
fi | ||
|
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
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
echo "Checking gsutil version" | ||
gsutil version | ||
|
||
echo "Checking kpt version" | ||
kpt version | ||
|
||
echo "Checking local-extract version" | ||
local-extract --version | ||
|
||
echo "Checking gke-gcloud-auth-plugin version" | ||
gke-gcloud-auth-plugin --version | ||
|
||
echo "Checking bq version" | ||
bq version | ||
|
||
echo "Checking bundled-python version" | ||
/usr/lib/google-cloud-sdk/platform/bundledpythonunix/bin/python --version | ||
|
||
echo "Checking cbt version" | ||
cbt version | ||
|
||
echo "Checking crc checksum for gcloud" | ||
gcloud-crc32c /usr/bin/gcloud | ||
|
||
echo "Checking kubectl version" | ||
kubectl version | ||
|
||
echo "Checking the emulators" | ||
./test-all-emulators.sh | ||
|