Skip to content

Commit

Permalink
Add convenience script for testing K8s demo
Browse files Browse the repository at this point in the history
  • Loading branch information
Geri Jennings committed Dec 4, 2018
1 parent 5c43341 commit 637b48d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
15 changes: 15 additions & 0 deletions demos/k8s-demo/04_test_deployment.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

set -euo pipefail

APPLICATION_URL=$(. ./admin_config.sh; echo ${APPLICATION_URL})

echo "Adding a pet..."
curl \
-i \
-d '{"name": "Mr. Snuggles"}' \
-H "Content-Type: application/json" \
${APPLICATION_URL}/pet

echo "Checking the pets..."
curl -i ${APPLICATION_URL}/pets
3 changes: 3 additions & 0 deletions demos/k8s-demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,9 @@ Date: Thu, 23 Aug 2018 12:58:16 GMT
[{"id":1,"name":"Mr. Snuggles"}]
```

For convenience, we've provided the `04_test_deployment.sh` script for you to
test adding a pet and retrieving the list of pets.

#### Rotate application database credentials

In addition to the demo you've seen so far, you can also **rotate the DB credentials** and watch the app continue to perform as expected.
Expand Down

0 comments on commit 637b48d

Please sign in to comment.