projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '19164-add-flags'
[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 7726d86ecfd4f8de748286303968c7f5ef392306..42ab716642739dee5d0d9a76b51f92d24146be7c 100755
(executable)
--- a/
tools/salt-install/tests/run-test.sh
+++ b/
tools/salt-install/tests/run-test.sh
@@
-3,10
+3,11
@@
#
# SPDX-License-Identifier: Apache-2.0
#
# SPDX-License-Identifier: Apache-2.0
-export ARVADOS_API_TOKEN=
changemesystemroottoken
-export ARVADOS_API_HOST=__CLUSTER__.__DOMAIN__:__
HOS
T_SSL_PORT__
+export ARVADOS_API_TOKEN=
__SYSTEM_ROOT_TOKEN__
+export ARVADOS_API_HOST=__CLUSTER__.__DOMAIN__:__
CONTROLLER_EX
T_SSL_PORT__
export ARVADOS_API_HOST_INSECURE=true
export ARVADOS_API_HOST_INSECURE=true
+set -o pipefail
# https://doc.arvados.org/v2.0/install/install-jobs-image.html
echo "Creating Arvados Standard Docker Images project"
# https://doc.arvados.org/v2.0/install/install-jobs-image.html
echo "Creating Arvados Standard Docker Images project"
@@
-28,13
+29,9
@@
fi
echo "Arvados project uuid is '${project_uuid}'"
echo "Arvados project uuid is '${project_uuid}'"
-echo "Uploading arvados/jobs' docker image to the project"
-VERSION="2.1.1"
-arv-keepdocker --pull arvados/jobs "${VERSION}" --project-uuid "${project_uuid}"
-
# Create the initial user
echo "Creating initial user '__INITIAL_USER__'"
# Create the initial user
echo "Creating initial user '__INITIAL_USER__'"
-user_uuid=$(arv --format=uuid user list --filters '[["email", "=", "
admin@arva2.arv.local"], ["username", "=", "admin
"]]')
+user_uuid=$(arv --format=uuid user list --filters '[["email", "=", "
__INITIAL_USER_EMAIL__"], ["username", "=", "__INITIAL_USER__
"]]')
if [ "x${user_uuid}" = "x" ]; then
user_uuid=$(arv --format=uuid user create --user '{"email": "__INITIAL_USER_EMAIL__", "username": "__INITIAL_USER__"}')
if [ "x${user_uuid}" = "x" ]; then
user_uuid=$(arv --format=uuid user create --user '{"email": "__INITIAL_USER_EMAIL__", "username": "__INITIAL_USER__"}')
@@
-46,14
+43,18
@@
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"
-cwl-runner hasher-workflow.cwl hasher-workflow-job.yml
+cwl-runner
--debug
hasher-workflow.cwl hasher-workflow-job.yml