projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
17755: Merge branch 'main' into 17755-add-singularity-to-compute-image
[arvados.git]
/
tools
/
salt-install
/
tests
/
run-test.sh
diff --git
a/tools/salt-install/tests/run-test.sh
b/tools/salt-install/tests/run-test.sh
index 53c51a2c5a097d2e8b45446ea26a7e2a26800f2d..020efa94e8f61303e06da5d087ecd712f9f1991f 100755
(executable)
--- a/
tools/salt-install/tests/run-test.sh
+++ b/
tools/salt-install/tests/run-test.sh
@@
-55,13
+55,17
@@
echo "Activating user '__INITIAL_USER__'"
arv user update --uuid "${user_uuid}" --user '{"is_active": true}'
echo "Getting the user API TOKEN"
arv user update --uuid "${user_uuid}" --user '{"is_active": true}'
echo "Getting the user API TOKEN"
-user_api_token=$(arv api_client_authorization list
--filters "[[\"owner_uuid\", \"=\", \"${user_uuid}\"],[\"kind\", \"==\", \"arvados#apiClientAuthorization\"]]" --limit=1 |jq -r .items[].api_token
)
+user_api_token=$(arv api_client_authorization list
| jq -r ".items[] | select( .owner_uuid == \"${user_uuid}\" ).api_token" | head -1
)
if [ "x${user_api_token}" = "x" ]; then
if [ "x${user_api_token}" = "x" ]; then
+ echo "No existing token found for user '__INITIAL_USER__' (user_uuid: '${user_uuid}'). Creating token"
user_api_token=$(arv api_client_authorization create --api-client-authorization "{\"owner_uuid\": \"${user_uuid}\"}" | jq -r .api_token)
fi
user_api_token=$(arv api_client_authorization create --api-client-authorization "{\"owner_uuid\": \"${user_uuid}\"}" | jq -r .api_token)
fi
+echo "API TOKEN FOR user '__INITIAL_USER__': '${user_api_token}'."
+
# Change to the user's token and run the workflow
# Change to the user's token and run the workflow
+echo "Switching to user '__INITIAL_USER__'"
export ARVADOS_API_TOKEN="${user_api_token}"
echo "Running test CWL workflow"
export ARVADOS_API_TOKEN="${user_api_token}"
echo "Running test CWL workflow"