Running with gitlab-runner 12.0.2 (d0b76032)
  on open-runner.greenhost.net XPrfB5Xo
section_start:1578928507:prepare_executor
Using Docker executor with image open.greenhost.net:4567/openappstack/single-sign-on/integration_test:29-only-login-once-for-all-applications ...
Starting service postgres:latest ...
Pulling docker image postgres:latest ...
Using docker image sha256:ec5d6d5f5b3434acb3652995f706f835ec4830f3443595688b5a010c6482e008 for postgres:latest ...
WARNING: Service postgres:latest is already created. Ignoring.
Starting service open.greenhost.net/openappstack/single-sign-on/login_provider:29-only-login-once-for-all-applications ...
Pulling docker image open.greenhost.net:4567/openappstack/single-sign-on/login_provider:29-only-login-once-for-all-applications ...
Using docker image sha256:2bdf707bbde36b735425426c6cac4f7a0e479e18ff5e9af8b23d9b4014801d8c for open.greenhost.net:4567/openappstack/single-sign-on/login_provider:29-only-login-once-for-all-applications ...
Starting service open.greenhost.net/openappstack/single-sign-on/consent_provider:29-only-login-once-for-all-applications ...
Pulling docker image open.greenhost.net:4567/openappstack/single-sign-on/consent_provider:29-only-login-once-for-all-applications ...
Using docker image sha256:32ab8905056c9ebafdd07e2e5df787350d3d909107e67a37f03bc4641893ab69 for open.greenhost.net:4567/openappstack/single-sign-on/consent_provider:29-only-login-once-for-all-applications ...
Starting service oryd/hydra:latest ...
Pulling docker image oryd/hydra:latest ...
Using docker image sha256:016084a50c07f4db6c5729b52249b64ff3108ab0f699c46773c5041b477ed3ef for oryd/hydra:latest ...
Starting service open.greenhost.net/openappstack/user-panel/backend:master ...
Pulling docker image open.greenhost.net:4567/openappstack/user-panel/backend:master ...
Using docker image sha256:38bbe4b03aba557527b9818e7d31ca16d9e20df631633c5f20e0becc6f3cab3a for open.greenhost.net:4567/openappstack/user-panel/backend:master ...
Starting service open.greenhost.net/openappstack/single-sign-on/login_logout:29-only-login-once-for-all-applications ...
Pulling docker image open.greenhost.net:4567/openappstack/single-sign-on/login_logout:29-only-login-once-for-all-applications ...
Using docker image sha256:67435bc216ececf59d17a428d47f3093cd004e1f4569ed296918d947679bf610 for open.greenhost.net:4567/openappstack/single-sign-on/login_logout:29-only-login-once-for-all-applications ...
Waiting for services to be up and running...

*** WARNING: Service runner-XPrfB5Xo-project-8-concurrent-1-oryd__hydra-3 probably didn't start properly.

Health check error:
exit code 1

Health check container logs:
2020-01-13T15:15:25.654338426Z FATAL: No HOST or PORT found                      

Service container logs:
2020-01-13T15:15:20.018082873Z time="2020-01-13T15:15:20Z" level=info msg="No tracer configured - skipping tracing setup"
2020-01-13T15:15:20.018157290Z time="2020-01-13T15:15:20Z" level=warning msg="Configuration key OIDC_SUBJECT_TYPES_SUPPORTED is deprecated and will be removed in a future release. Use key oidc.subject_identifiers.enabled instead!"
2020-01-13T15:15:20.018169359Z time="2020-01-13T15:15:20Z" level=warning msg="Configuration key OIDC_SUBJECT_TYPE_PAIRWISE_SALT is deprecated and will be removed in a future release. Use key oidc.subject_identifiers.pairwise.salt instead!"
2020-01-13T15:15:20.018175992Z time="2020-01-13T15:15:20Z" level=warning msg="Configuration key OIDC_SUBJECT_TYPE_PAIRWISE_SALT is deprecated and will be removed in a future release. Use key oidc.subject_identifiers.pairwise.salt instead!"
2020-01-13T15:15:20.018181846Z time="2020-01-13T15:15:20Z" level=warning msg="JSON Web Key Set \"hydra.openid.id-token\" does not exist yet, generating new key pair..."
2020-01-13T15:15:20.018233998Z Config file not found because "Config File ".hydra" Not Found in "[/]""

*********


*** WARNING: Service runner-XPrfB5Xo-project-8-concurrent-1-open.greenhost.net__openappstack__single-sign-on__login_logout-5 probably didn't start properly.

Health check error:
exit code 1

Health check container logs:
2020-01-13T15:15:25.776186625Z FATAL: No HOST or PORT found                      

Service container logs:
2020-01-13T15:15:25.414776170Z  * Environment: development
2020-01-13T15:15:25.414841509Z  * Debug mode: on
2020-01-13T15:15:25.586103416Z  * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
2020-01-13T15:15:25.601905203Z  * Restarting with stat
2020-01-13T15:15:26.541590039Z  * Debugger is active!
2020-01-13T15:15:26.550732162Z  * Debugger PIN: 143-240-685

*********

Pulling docker image open.greenhost.net:4567/openappstack/single-sign-on/integration_test:29-only-login-once-for-all-applications ...
Using docker image sha256:543dcae8eec7568da80685b914c076e76b4f4d700282b7a8015a55aae912cbae for open.greenhost.net:4567/openappstack/single-sign-on/integration_test:29-only-login-once-for-all-applications ...
section_end:1578928529:prepare_executor
section_start:1578928529:prepare_script
Running on runner-XPrfB5Xo-project-8-concurrent-1 via open-runner.greenhost.net...
section_end:1578928531:prepare_script
section_start:1578928531:get_sources
Fetching changes with git depth set to 50...
Reinitialized existing Git repository in /builds/openappstack/single-sign-on/.git/
From https://open.greenhost.net/openappstack/single-sign-on
 * [new ref]         refs/pipelines/2381 -> refs/pipelines/2381
   3d0e2e6..baa8dd4  29-only-login-once-for-all-applications -> origin/29-only-login-once-for-all-applications
Checking out baa8dd4f as 29-only-login-once-for-all-applications...

Updating/initializing submodules recursively...
Synchronizing submodule url for 'user-panel'
Entering 'user-panel'
Entering 'user-panel'
HEAD is now at 35372e3 Merge branch '1-feature-as-a-user-i-can-set-my-profile-settings' into 'master'
Submodule path 'user-panel': checked out 'b65ce8ad3ee18c2606c8f862f0f87fcb53b4d24b'
Entering 'user-panel'
section_end:1578928536:get_sources
section_start:1578928536:restore_cache
section_end:1578928538:restore_cache
section_start:1578928538:download_artifacts
section_end:1578928540:download_artifacts
section_start:1578928540:build_script
$ echo "WAIT FOR SERVICES TO INITIALIZE" && sleep 20
WAIT FOR SERVICES TO INITIALIZE
$ /bin/bash user-panel/backend/utils/create-user.bash ${TESTUSER_USERNAME} ${TESTUSER_PASSWORD} ${TESTUSER_EMAIL} backend:5000
Creating user testuser
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   132    0     0  100   132      0    193 --:--:-- --:--:-- --:--:--   193
100   188  100    56  100   132     82    193 --:--:-- --:--:-- --:--:--   275
{"data":{"createUser":{"user":{"username":"testuser"}}}}$ /bin/bash user-panel/backend/utils/create-user.bash ${TESTUSER_USERNAME2} ${TESTUSER_PASSWORD} ${TESTUSER_EMAIL2} backend:5000
Creating user testuser2
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   191  100    57  100   134    130    305 --:--:-- --:--:-- --:--:--   436
{"data":{"createUser":{"user":{"username":"testuser2"}}}}$ /bin/bash user-panel/backend/utils/create-application.bash ${KEY} backend:5000
Creating application testapp
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   145  100    65  100    80   2826   3478 --:--:-- --:--:-- --:--:--  6304
{"data":{"createApplication":{"application":{"name":"testapp"}}}}$ /bin/bash user-panel/backend/utils/create-role.bash ${ROLE} backend:5000
Creating role admin
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   113  100    49  100    64   2130   2782 --:--:-- --:--:-- --:--:--  4913
{"data":{"createRole":{"role":{"name":"admin"}}}}$ /bin/bash user-panel/backend/utils/grant-access.bash ${TESTUSER_USERNAME} ${KEY} backend:5000
Granting access to application testapp to User testuser
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   265  100   121  100   144   3025   3600 --:--:-- --:--:-- --:--:--  6625
{"data":{"addApplicationToUser":{"user":{"username":"testuser","applications":{"edges":[{"node":{"name":"testapp"}}]}}}}}$ /bin/bash user-panel/backend/utils/assign-role.bash ${TESTUSER_USERNAME} ${ROLE} backend:5000
Assigning role admin to User testuser
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0{"data":{"addRoleToUser":{"user":{"username":"testuser","roles":{"edges":[{"node":{"name":"admin"}}]}}}}}
100   226  100   105  100   121   2500   2880 --:--:-- --:--:-- --:--:--  5380
$ /bin/bash test/create-hydra-client.bash ${KEY} ${SECRET} http://hydra:4445 http://oauth:5000/callback
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   904  100   591  100   313   4728   2504 --:--:-- --:--:-- --:--:--  7290
{"client_id":"testapp","client_name":"testapp","client_secret":"secret","redirect_uris":["http://oauth:5000/callback"],"grant_types":["authorization_code","refresh_token"],"response_types":["code"],"scope":"openid profile email openappstack_roles","audience":null,"owner":"","policy_uri":"","allowed_cors_origins":null,"tos_uri":"","client_uri":"","logo_uri":"","contacts":null,"client_secret_expires_at":0,"subject_type":"public","token_endpoint_auth_method":"client_secret_post","userinfo_signed_response_alg":"none","created_at":"2020-01-13T15:16:05Z","updated_at":"2020-01-13T15:16:05Z"}$ cd test/login_logout/test/behave/
$ python3 -m behave -D headless=True -D url=http://oauth:5000 -D username=${TESTUSER_USERNAME} -D username2=${TESTUSER_USERNAME2} -D password=${TESTUSER_PASSWORD} -D email=${TESTUSER_EMAIL} -D role=${ROLE}
@oauth
Feature: Test login-provider function # features/login.feature:2
  As an OAS user
  I want to be able to login to an OAS App
  And verify my userdata that is provided by OpenID Connect
  Scenario: Open the oAuth application and Login witha valid user     # features/login.feature:7
    Given the oauth client "home" URL was opened                      # features/steps/login.py:13
    And the element "input#username" is visible                       # ../../../../../../../usr/lib/python3.6/site-packages/behave_webdriver/steps/expectations.py:14
    When I enter the "username" in the inputfield "input#username"    # features/steps/login.py:18
    And I enter the "password" in the inputfield "input#password"     # features/steps/login.py:18
    And I click on the button "input#submit"                          # ../../../../../../../usr/lib/python3.6/site-packages/behave_webdriver/steps/actions.py:36
    Then I wait on element "input#password" for 1000ms to not exist   # ../../../../../../../usr/lib/python3.6/site-packages/behave_webdriver/steps/expectations.py:312
    And I expect that the path is "/callback"                         # ../../../../../../../usr/lib/python3.6/site-packages/behave_webdriver/steps/expectations.py:247
    And I expect that element "body" contains the text "access_token" # ../../../../../../../usr/lib/python3.6/site-packages/behave_webdriver/steps/expectations.py:121

  Scenario: Get OpenID Connect userdata for testuser                              # features/login.feature:17
    When I open the oauth client "userinfo" URL                                   # features/steps/login.py:13
    Then I expect that the "preferred_username" in the json output is "username"  # features/steps/login.py:33
    And I expect that the "email" in the json output is "email"                   # features/steps/login.py:33
    And I expect that the "openappstack_roles" in the json output contains "role" # features/steps/login.py:37
    And I expect that the "name" in the json output is "username"                 # features/steps/login.py:33

  Scenario: Logout                                                   # features/login.feature:24
    When I open the oauth client "logout" URL                        # features/steps/login.py:13
    Then I wait on element "input#username" for 1000ms to be visible # ../../../../../../../usr/lib/python3.6/site-packages/behave_webdriver/steps/expectations.py:312
    And I expect that element "input#password" is visible            # ../../../../../../../usr/lib/python3.6/site-packages/behave_webdriver/steps/expectations.py:14
    And I expect that element "input#submit" is visible              # ../../../../../../../usr/lib/python3.6/site-packages/behave_webdriver/steps/expectations.py:14

  Scenario: Login with a valid user without access to an application                    # features/login.feature:30
    Given the oauth client "home" URL was opened                                        # features/steps/login.py:13
    And the element "input#username" is visible                                         # ../../../../../../../usr/lib/python3.6/site-packages/behave_webdriver/steps/expectations.py:14
    When I enter the "username2" in the inputfield "input#username"                     # features/steps/login.py:18
    And I enter the "password" in the inputfield "input#password"                       # features/steps/login.py:18
    And I click on the button "input#submit"                                            # ../../../../../../../usr/lib/python3.6/site-packages/behave_webdriver/steps/actions.py:36
    Then I wait on element "input#password" for 1000ms to not exist                     # ../../../../../../../usr/lib/python3.6/site-packages/behave_webdriver/steps/expectations.py:312
    And I expect that element "input#username" does not exist                           # ../../../../../../../usr/lib/python3.6/site-packages/behave_webdriver/steps/expectations.py:83
    And I expect that the path is "/callback"                                           # ../../../../../../../usr/lib/python3.6/site-packages/behave_webdriver/steps/expectations.py:247
    And I expect that element "body" contains the text "error"                          # ../../../../../../../usr/lib/python3.6/site-packages/behave_webdriver/steps/expectations.py:121
    And I expect that element "body" contains the text "Permission denied"              # ../../../../../../../usr/lib/python3.6/site-packages/behave_webdriver/steps/expectations.py:121
    And I expect that element "body" contains the text "missing application permission" # ../../../../../../../usr/lib/python3.6/site-packages/behave_webdriver/steps/expectations.py:121

  Scenario: Login with an invalid user without                                        # features/login.feature:43
    Given the oauth client "home" URL was opened                                      # features/steps/login.py:13
    And the element "input#username" is visible                                       # ../../../../../../../usr/lib/python3.6/site-packages/behave_webdriver/steps/expectations.py:14
    When I set "not_a_valid_user" to the inputfield "input#username"                  # ../../../../../../../usr/lib/python3.6/site-packages/behave_webdriver/steps/actions.py:41
    And I set "password" to the inputfield "input#password"                           # ../../../../../../../usr/lib/python3.6/site-packages/behave_webdriver/steps/actions.py:41
    And I click on the button "input#submit"                                          # ../../../../../../../usr/lib/python3.6/site-packages/behave_webdriver/steps/actions.py:36
    Then I wait on element "input#password" for 1000ms to not exist                   # ../../../../../../../usr/lib/python3.6/site-packages/behave_webdriver/steps/expectations.py:312
    And I expect that element "input#username" does not exist                         # ../../../../../../../usr/lib/python3.6/site-packages/behave_webdriver/steps/expectations.py:83
    And I expect that the path is "/callback"                                         # ../../../../../../../usr/lib/python3.6/site-packages/behave_webdriver/steps/expectations.py:247
    And I expect that element "body" contains the text "error"                        # ../../../../../../../usr/lib/python3.6/site-packages/behave_webdriver/steps/expectations.py:121
    And I expect that element "body" contains the text "Login denied"                 # ../../../../../../../usr/lib/python3.6/site-packages/behave_webdriver/steps/expectations.py:121
    And I expect that element "body" contains the text "Invalid username or password" # ../../../../../../../usr/lib/python3.6/site-packages/behave_webdriver/steps/expectations.py:121

1 feature passed, 0 failed, 0 skipped
5 scenarios passed, 0 failed, 0 skipped
39 steps passed, 0 failed, 0 skipped, 0 undefined
Took 0m6.265s
section_end:1578928575:build_script
section_start:1578928575:after_script
section_end:1578928576:after_script
section_start:1578928576:archive_cache
section_end:1578928579:archive_cache
section_start:1578928579:upload_artifacts_on_success
section_end:1578928581:upload_artifacts_on_success
Job succeeded