Skip to content

Commit 9d374b6

Browse files
author
Suleyman Akbas
authored
Add kyma test command to the integration test (kyma-project#1289)
1 parent 2b832c5 commit 9d374b6

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

prow/scripts/provision-vm-cli.sh

+19-3
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,25 @@ shout "Checking the versions"
123123

124124
gcloud compute ssh --quiet --zone="${ZONE}" "cli-integration-test-${RANDOM_ID}" -- "sudo kyma version"
125125

126-
# shout "Testing Kyma"
127-
128-
# gcloud compute ssh --quiet --zone="${ZONE}" "cli-integration-test-${RANDOM_ID}" -- "sudo kyma test run"
126+
shout "Running a simple test on Kyma"
127+
128+
gcloud compute ssh --quiet --zone="${ZONE}" "cli-integration-test-${RANDOM_ID}" -- "sudo kyma test run dex-connection"
129+
130+
echo "Check if the test succeeds"
131+
date
132+
attempts=3
133+
for ((i=1; i<=attempts; i++)); do
134+
result=$(gcloud compute ssh --quiet --zone="${ZONE}" "cli-integration-test-${RANDOM_ID}" -- "sudo kyma test status -o json" | jq '.status.results[0].status')
135+
if [[ "$result" == *"Succeeded"* ]]; then
136+
echo "The test succeeded"
137+
break
138+
elif [[ "${i}" == "${attempts}" ]]; then
139+
echo "ERROR: test result is ${result}"
140+
exit 1
141+
fi
142+
echo "Sleep for 15 seconds"
143+
sleep 15
144+
done
129145

130146
shout "Uninstalling Kyma"
131147

0 commit comments

Comments
 (0)