From 569b7ca0a99d025e759b833e19989bf2a592659e Mon Sep 17 00:00:00 2001 From: Varac <varac@varac.net> Date: Thu, 9 May 2019 12:25:42 +0200 Subject: [PATCH] Add proposed changes from review --- .gitlab-ci.yml | 15 +++++++++++++++ test/behave/features/environment.py | 6 +++--- test/behave/features/steps/login.py | 1 - 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ba2242085..43923d894 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -73,6 +73,21 @@ certs: - cd test/ - py.test -s -m 'certs' --connection=ansible --ansible-inventory=./inventory.yml --hosts='ansible://*' +behave: + stage: test + script: + # Debug failing CI caches which happened in the past + - find . -name behave.ini + - ls -al test/behave + - grep -v 'nextcloud.password' test/behave/behave.ini + - cd test/behave/ + - behave -D headless=True + artifacts: + paths: + - test/behave/screenshots/ + expire_in: 1 month + when: on_failure + terminate: stage: cleanup script: diff --git a/test/behave/features/environment.py b/test/behave/features/environment.py index bc3dae74c..cdf925fef 100644 --- a/test/behave/features/environment.py +++ b/test/behave/features/environment.py @@ -29,9 +29,9 @@ def before_all(context): context.nextcloud['password'] = \ userdata.get('nextcloud.password') - assert context.nextcloud['url'], 'Nextcloud url variable missing in userdata!' - assert context.nextcloud['username'], 'Nextcloud username variable missing in userdata!' - assert context.nextcloud['password'], 'Nextcloud password variable missing in userdata!' + assert context.nextcloud['url'], 'Nextcloud url variable missing in userdata. Provide it with "-D nextcloud.url".' + assert context.nextcloud['username'], 'Nextcloud username variable missing in userdata. Provide it with "-D nextcloud.username".' + assert context.nextcloud['password'], 'Nextcloud password variable missing in userdata. Provide it with "-D nextcloud.password".' headless = userdata.get('headless', 'False') diff --git a/test/behave/features/steps/login.py b/test/behave/features/steps/login.py index 77ce58c6b..3092420a7 100644 --- a/test/behave/features/steps/login.py +++ b/test/behave/features/steps/login.py @@ -17,6 +17,5 @@ def step_impl(context, section, cred_type, element): elem.clear() context_section = getattr(context, section) - print(context_section) value = context_section[cred_type] elem.send_keys(value) -- GitLab