-
Notifications
You must be signed in to change notification settings - Fork 472
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Tomoya Usami <[email protected]> Co-authored-by: Evan Gilman <[email protected]>
- Loading branch information
Showing
3 changed files
with
23 additions
and
3 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
19 changes: 19 additions & 0 deletions
19
test/integration/suites/upstream-authority-vault/04-verify-token-renewal.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,19 @@ | ||
#!/bin/bash | ||
|
||
set -eo pipefail | ||
|
||
log-debug "verifying token renewal..." | ||
|
||
timeout=$(date -ud "1 minute 30 second" +%s) | ||
count=0 | ||
|
||
while [ $(date -u +%s) -lt $timeout ]; do | ||
count=`./bin/kubectl logs -n spire $(./bin/kubectl get pod -n spire -o name) | echo "$(grep "Successfully renew auth token" || [[ $? == 1 ]])" | wc -l` | ||
if [ $count -ge 2 ]; then | ||
log-info "token renewal is verified" | ||
exit 0 | ||
fi | ||
sleep 10 | ||
done | ||
|
||
fail-now "expected number of token renewal log not found" |
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