Skip to content
Snippets Groups Projects
Commit 66b61f32 authored by Mart van Santen's avatar Mart van Santen
Browse files

Commented most of integration testing

parent ac4a44c5
No related branches found
No related tags found
2 merge requests!68Merge loginpanel into main and release 0.5.0,!56Resolve "Remove old panel from code"
Pipeline #9834 failed
This commit is part of merge request !56. Comments created here will be created in the context of that merge request.
......@@ -45,6 +45,10 @@ pylint:
- .gitlab-ci.yml
# TODO: This integration testing is the old test. This need to be modified
# and will happen in the issue which is about integration the login
# image & testing that
behave-integration:
stage: integration-test
services:
......@@ -99,27 +103,27 @@ behave-integration:
image: ${CI_REGISTRY_IMAGE}/integration_test:${CI_COMMIT_REF_NAME}
script:
# Create user and application objects
- /bin/bash user-panel/backend/utils/create-user.bash ${TESTUSER_USERNAME} ${TESTUSER_PASSWORD} ${TESTUSER_EMAIL} backend:5000
- /bin/bash user-panel/backend/utils/create-user.bash ${TESTUSER_USERNAME2} ${TESTUSER_PASSWORD} ${TESTUSER_EMAIL2} backend:5000
- /bin/bash user-panel/backend/utils/create-application.bash ${KEY} "Application used for testing" backend:5000
- /bin/bash user-panel/backend/utils/create-role.bash ${ROLE} backend:5000
- /bin/bash user-panel/backend/utils/grant-access.bash ${TESTUSER_USERNAME} ${KEY} backend:5000
- /bin/bash user-panel/backend/utils/assign-role.bash ${TESTUSER_USERNAME} ${ROLE} backend:5000
#- /bin/bash user-panel/backend/utils/create-user.bash ${TESTUSER_USERNAME} ${TESTUSER_PASSWORD} ${TESTUSER_EMAIL} backend:5000
#- /bin/bash user-panel/backend/utils/create-user.bash ${TESTUSER_USERNAME2} ${TESTUSER_PASSWORD} ${TESTUSER_EMAIL2} backend:5000
#- /bin/bash user-panel/backend/utils/create-application.bash ${KEY} "Application used for testing" backend:5000
#- /bin/bash user-panel/backend/utils/create-role.bash ${ROLE} backend:5000
#- /bin/bash user-panel/backend/utils/grant-access.bash ${TESTUSER_USERNAME} ${KEY} backend:5000
#- /bin/bash user-panel/backend/utils/assign-role.bash ${TESTUSER_USERNAME} ${ROLE} backend:5000
# Wait for 60s for hydra to become available. Then create the oauth2 client object
- while [[ $HYDRAADMINSTATUS -ne "200" && 60 -ge $TIMER ]]; do HYDRAADMINSTATUS=`curl http://hydra:4445/health/ready -o /dev/null -w "%{http_code}"` || TIMER=$TIMER+5 && sleep 5 ; done
- /bin/bash test/create-hydra-client.bash ${KEY} ${SECRET} http://hydra:4445 http://oidc:5000/callback http://oidc:5000/ http://oidc:5000/logout
- cd test/integration_tests/test/behave/
- TIMER=0
- while [[ $HYDRASTATUS -ne "200" && 60 -ge $TIMER ]]; do HYDRASTATUS=`curl http://hydra:4444/health/ready -o /dev/null -w "%{http_code}"` || TIMER=$TIMER+5 && sleep 5 ; done
- >
python3 -m behave
-D headless=True
-D url=http://oidc:5000
-D username=${TESTUSER_USERNAME}
-D username2=${TESTUSER_USERNAME2}
-D password=${TESTUSER_PASSWORD}
-D email=${TESTUSER_EMAIL}
-D role=${ROLE}
#- while [[ $HYDRAADMINSTATUS -ne "200" && 60 -ge $TIMER ]]; do HYDRAADMINSTATUS=`curl http://hydra:4445/health/ready -o /dev/null -w "%{http_code}"` || TIMER=$TIMER+5 && sleep 5 ; done
#- /bin/bash test/create-hydra-client.bash ${KEY} ${SECRET} http://hydra:4445 http://oidc:5000/callback http://oidc:5000/ http://oidc:5000/logout
#- cd test/integration_tests/test/behave/
#- TIMER=0
#- while [[ $HYDRASTATUS -ne "200" && 60 -ge $TIMER ]]; do HYDRASTATUS=`curl http://hydra:4444/health/ready -o /dev/null -w "%{http_code}"` || TIMER=$TIMER+5 && sleep 5 ; done
#- >
# python3 -m behave
# -D headless=True
# -D url=http://oidc:5000
# -D username=${TESTUSER_USERNAME}
# -D username2=${TESTUSER_USERNAME2}
# -D password=${TESTUSER_PASSWORD}
# -D email=${TESTUSER_EMAIL}
# -D role=${ROLE}
artifacts:
paths:
- test/integration_tests/test/behave/screenshots/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment