diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ba22420856af44b3305ba31fe59a96138bc22746..43923d894b1a0801ccec4c1fddd329c4df9bd721 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 bc3dae74c87096e7eebcd137ec3441acf4ee5168..cdf925fefdba355c63b620a92a7d7b31971a69d7 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 77ce58c6ba852408c2461295262cb2f6b03d450c..3092420a775649517a72234e5b440a0030578c98 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)