From 66b61f32fdb7e2af5952a2ac3fa7458c5a87b096 Mon Sep 17 00:00:00 2001 From: Mart van Santen <mart@greenhost.nl> Date: Thu, 25 Nov 2021 07:57:23 +0100 Subject: [PATCH] Commented most of integration testing --- .gitlab-ci.yml | 44 ++++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 587c1db..d3d4db8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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/ -- GitLab