-
Notifications
You must be signed in to change notification settings - Fork 344
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for custom container images (#2035)
Signed-off-by: Israel Blancas <[email protected]> Signed-off-by: Israel Blancas <[email protected]> Co-authored-by: Ben B <[email protected]>
- Loading branch information
Showing
4 changed files
with
34 additions
and
0 deletions.
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,5 @@ | ||
# Install Elasticsearch | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
- script: "./check-collector-img.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,4 @@ | ||
# Set custom img | ||
## What is this test case testing? | ||
|
||
This test checks if setting a custom container image works for the Jaeger Collector. |
17 changes: 17 additions & 0 deletions
17
tests/e2e/miscellaneous/set-custom-img/check-collector-img.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,17 @@ | ||
#!/bin/bash | ||
|
||
|
||
function check_image(){ | ||
export IMG=$(kubectl get deployment my-jaeger-collector -n $NAMESPACE -o jsonpath='{.spec.template.spec.containers[0].image}') | ||
} | ||
|
||
|
||
check_image | ||
while [ "$IMG" != "test" ] | ||
do | ||
echo "Collector image missmatch. Expected: test. Has: $IMG" | ||
sleep 5 | ||
check_image | ||
done | ||
|
||
echo "Collector image asserted properly!" |