Wait for server to become ready before creating token

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
pull/6944/head
Brad Davidson 2023-02-10 02:23:55 +00:00 committed by Brad Davidson
parent 290d7e8fd1
commit 0d416d797d
1 changed files with 1 additions and 0 deletions

View File

@ -12,6 +12,7 @@ export NUM_AGENTS=1
export WAIT_SERVICES="${all_services[@]}"
agent-pre-hook() {
timeout --foreground 2m bash -c "wait-for-nodes $(( NUM_SERVERS ))"
local server=$(cat $TEST_DIR/servers/1/metadata/name)
docker exec $server k3s token create --ttl=5m --description=Test > $TEST_DIR/metadata/secret
}