diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bd8a7f7e7e17e2368d89289a5bfe997cbce12790..ad690ce145dad1c4104182b6081cb83096acf952 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,7 +3,7 @@ include: stages: - build - # - build-test-images + - build-test-images # TODO: Re-enable after fixing #82 # - lint #- application-test @@ -40,11 +40,6 @@ login: KANIKO_CONTEXT: "login" KANIKO_BUILD_IMAGENAME: $CI_JOB_NAME before_script: - - echo ${CI_PROJECT_DIR}/${KANIKO_CONTEXT:-.}/Dockerfile - - ls -l /builds/ - - ls -l /builds/stackspin/ - - ls -l /builds/stackspin/single-sign-on/ - - ls -l /builds/stackspin/single-sign-on/login - ls -l ${CI_PROJECT_DIR}/${KANIKO_CONTEXT:-.}/Dockerfile only: changes: @@ -52,28 +47,29 @@ login: - .gitlab-ci.yml -#integration_test_app: -# stage: build-test-images -# variables: -# KANIKO_CONTEXT: "test/integration_tests" -# KANIKO_BUILD_IMAGENAME: $CI_JOB_NAME -# extends: .kaniko_build -# only: -# changes: -# - test/integration_tests/**/* -# - .gitlab-ci.yml +# A Fake SSO app to test the behaviour +ssotest_app: + stage: build-test-images + variables: + KANIKO_CONTEXT: "test/ssotest_app" + KANIKO_BUILD_IMAGENAME: $CI_JOB_NAME + extends: .kaniko_build + only: + changes: + - test/ssotest_app/**/* + - .gitlab-ci.yml -#integration_test: -# stage: build-test-images -# variables: -# KANIKO_CONTEXT: "test/integration_tests/test" -# KANIKO_BUILD_IMAGENAME: $CI_JOB_NAME -# extends: .kaniko_build -# only: -# changes: -# - test/integration_tests/test/**/* -# - test/integration_tests/test/Dockerfile -# - .gitlab-ci.yml +# Webbrowser tests +behave_test: + stage: build-test-images + variables: + KANIKO_CONTEXT: "test/behave_test" + KANIKO_BUILD_IMAGENAME: $CI_JOB_NAME + extends: .kaniko_build + only: + changes: + - test/behave_test/**/* + - .gitlab-ci.yml #pylint: # stage: build-test-images @@ -154,6 +150,8 @@ behave-integration: - http://oidc:5000/login - name: ${CI_REGISTRY_IMAGE}/login:${CI_COMMIT_REF_NAME} alias: oidc + - name: ${CI_REGISTRY_IMAGE}/test/ssotest_app:${CI_COMMIT_REF_NAME} + alias: ssoapp variables: # Feature Flag FF_NETWORK_PER_BUILD Enables creation of a docker network per build # with the docker executor of the gitlab-runner. This is required for service @@ -202,9 +200,9 @@ behave-integration: OAUTHLIB_INSECURE_TRANSPORT: "true" KEY: "testapp" SECRET: "secret" - image: ${CI_REGISTRY_IMAGE}/login:${CI_COMMIT_REF_NAME} + image: ${CI_REGISTRY_IMAGE}/test/behave_test:${CI_COMMIT_REF_NAME} script: - - echo "I am skipped today!" + - curl http://kratos:4433/health/alive - curl http://oidc:5000/whoami # Create user and application objects #- /bin/bash user-panel/backend/utils/create-user.bash ${TESTUSER_USERNAME} ${TESTUSER_PASSWORD} ${TESTUSER_EMAIL} backend:5000 diff --git a/test/integration_tests/test/Dockerfile b/test/behave/Dockerfile similarity index 100% rename from test/integration_tests/test/Dockerfile rename to test/behave/Dockerfile diff --git a/test/integration_tests/test/behave/features/environment.py b/test/behave/behave/features/environment.py similarity index 100% rename from test/integration_tests/test/behave/features/environment.py rename to test/behave/behave/features/environment.py diff --git a/test/integration_tests/test/behave/features/login.feature b/test/behave/behave/features/login.feature similarity index 100% rename from test/integration_tests/test/behave/features/login.feature rename to test/behave/behave/features/login.feature diff --git a/test/integration_tests/test/behave/features/logout.feature b/test/behave/behave/features/logout.feature similarity index 100% rename from test/integration_tests/test/behave/features/logout.feature rename to test/behave/behave/features/logout.feature diff --git a/test/integration_tests/test/behave/features/reject_unauthorized_logins.feature b/test/behave/behave/features/reject_unauthorized_logins.feature similarity index 100% rename from test/integration_tests/test/behave/features/reject_unauthorized_logins.feature rename to test/behave/behave/features/reject_unauthorized_logins.feature diff --git a/test/integration_tests/test/behave/features/remember_me.feature b/test/behave/behave/features/remember_me.feature similarity index 100% rename from test/integration_tests/test/behave/features/remember_me.feature rename to test/behave/behave/features/remember_me.feature diff --git a/test/integration_tests/test/behave/features/steps/compare_json_values.py b/test/behave/behave/features/steps/compare_json_values.py similarity index 100% rename from test/integration_tests/test/behave/features/steps/compare_json_values.py rename to test/behave/behave/features/steps/compare_json_values.py diff --git a/test/integration_tests/test/behave/features/steps/webdriver_with_variables.py b/test/behave/behave/features/steps/webdriver_with_variables.py similarity index 100% rename from test/integration_tests/test/behave/features/steps/webdriver_with_variables.py rename to test/behave/behave/features/steps/webdriver_with_variables.py diff --git a/test/integration_tests/Dockerfile b/test/sso_testapp/Dockerfile similarity index 100% rename from test/integration_tests/Dockerfile rename to test/sso_testapp/Dockerfile diff --git a/test/integration_tests/README.md b/test/sso_testapp/README.md similarity index 100% rename from test/integration_tests/README.md rename to test/sso_testapp/README.md diff --git a/test/integration_tests/app.py b/test/sso_testapp/app.py similarity index 100% rename from test/integration_tests/app.py rename to test/sso_testapp/app.py diff --git a/test/integration_tests/requirements.txt b/test/sso_testapp/requirements.txt similarity index 100% rename from test/integration_tests/requirements.txt rename to test/sso_testapp/requirements.txt