From a43edc9bb4b40bf57394e99cef627d04755db624 Mon Sep 17 00:00:00 2001 From: Varac <varac@varac.net> Date: Wed, 24 Apr 2019 12:42:58 +0200 Subject: [PATCH] Remove keycloak specific behave parts --- test/behave/features/environment.py | 7 ------- test/behave/features/keycloak.feature | 16 ---------------- test/behave/features/steps/login.py | 7 ------- test/ci-bootstrap.py | 7 ------- 4 files changed, 37 deletions(-) delete mode 100644 test/behave/features/keycloak.feature diff --git a/test/behave/features/environment.py b/test/behave/features/environment.py index 55df3d290..eb9cac121 100644 --- a/test/behave/features/environment.py +++ b/test/behave/features/environment.py @@ -22,13 +22,6 @@ def save_screenshot(context, step): def before_all(context): """Run at the very beginning.""" userdata = context.config.userdata - context.keycloak = {} - context.keycloak['admin'] = {} - context.keycloak['admin']['url'] = userdata.get('keycloak.admin.url') - context.keycloak['admin']['username'] = \ - userdata.get('keycloak.admin.username', 'keycloak') - context.keycloak['admin']['password'] = \ - userdata.get('keycloak.admin.password') headless = userdata.get('headless', 'False') diff --git a/test/behave/features/keycloak.feature b/test/behave/features/keycloak.feature deleted file mode 100644 index 845f0cf47..000000000 --- a/test/behave/features/keycloak.feature +++ /dev/null @@ -1,16 +0,0 @@ -Feature: Test keycloak admin login - As an OAS admin - I want to be able to login to the keycloak admin console - -Scenario: Open keycloak admin console - Given the title is not "Log in to Keycloak" - When I open the keycloak admin console url - Then I wait on element "input#username" for 25000ms to be visible - And I expect that the title is "Log in to Keycloak" - -Scenario: Login to keycloak - Given the title is "Log in to Keycloak" - When I enter the "keycloak" "admin" "username" in the inputfield "input#username" - When I enter the "keycloak" "admin" "password" in the inputfield "input#password" - And I click on the button "input#kc-login" - Then I wait on element "input#displayName" for 25000ms to be visible diff --git a/test/behave/features/steps/login.py b/test/behave/features/steps/login.py index a8d1ee722..4eec789c8 100644 --- a/test/behave/features/steps/login.py +++ b/test/behave/features/steps/login.py @@ -4,13 +4,6 @@ from behave import given, when from behave_webdriver.steps import * -@when(u'I open the keycloak admin console url') -@given(u'I open the keycloak admin console url') -def step_impl(context): - """Login to the keycloak admin console.""" - context.behave_driver.get(context.keycloak['admin']['url']) - - @when(u'I enter the "{section}" "{user}" "{cred_type}" in the inputfield "{element}"') def step_impl(context, section, user, cred_type, element): """Enter username/password into login inputfields.""" diff --git a/test/ci-bootstrap.py b/test/ci-bootstrap.py index 97a720e77..5ef2493c2 100755 --- a/test/ci-bootstrap.py +++ b/test/ci-bootstrap.py @@ -262,16 +262,9 @@ def write_behave_config(settings=None): if settings is None: with open(SETTINGS_FILE) as stream: settings = yaml.safe_load(stream) -# with open('./secrets/keycloak_admin_password', 'r') as stream: -# keycloak_admin_password = yaml.safe_load(stream) behave_config = configparser.ConfigParser() behave_config['behave'] = {'stop': True} behave_config['behave.userdata'] = {} - behave_config['behave.userdata']['keycloak.admin.url'] = \ - 'https://auth.{}/auth/admin/master/console/'.format(settings['domain']) - behave_config['behave.userdata']['keycloak.admin.username'] = 'keycloak' -# behave_config['behave.userdata']['keycloak.admin.password'] = \ -# keycloak_admin_password with open('./behave/behave.ini', 'w') as configfile: behave_config.write(configfile) -- GitLab