diff options
author | John L. Villalovos <john@sodarock.com> | 2022-07-25 23:09:50 -0700 |
---|---|---|
committer | John L. Villalovos <john@sodarock.com> | 2022-07-25 23:09:50 -0700 |
commit | 10987b3089d4fe218dd2116dd871e0a070db3f7f (patch) | |
tree | 019c635d3ec4a435d66068335aa31cb460d79de6 | |
parent | 17c01ea55806c722523f2f9aef0175455ec942c5 (diff) | |
download | gitlab-10987b3089d4fe218dd2116dd871e0a070db3f7f.tar.gz |
test(ee): add an EE specific test
-rw-r--r-- | tests/functional/api/test_groups.py | 10 | ||||
-rw-r--r-- | tests/functional/conftest.py | 6 |
2 files changed, 11 insertions, 5 deletions
diff --git a/tests/functional/api/test_groups.py b/tests/functional/api/test_groups.py index 83d032c..88e5a36 100644 --- a/tests/functional/api/test_groups.py +++ b/tests/functional/api/test_groups.py @@ -218,8 +218,9 @@ def test_group_subgroups_projects(gl, user): group4.delete() -@pytest.mark.skip -def test_group_wiki(group): +def test_group_wiki(gitlab_ee, group): + if not gitlab_ee: + pytest.skip("Requires GitLab EE to run") content = "Group Wiki page content" wiki = group.wikis.create({"title": "groupwikipage", "content": content}) assert wiki in group.wikis.list() @@ -234,8 +235,9 @@ def test_group_wiki(group): assert wiki not in group.wikis.list() -@pytest.mark.skip(reason="EE feature") -def test_group_hooks(group): +def test_group_hooks(gitlab_ee, group): + if not gitlab_ee: + pytest.skip("Requires GitLab EE to run") hook = group.hooks.create({"url": "http://hook.url"}) assert hook in group.hooks.list() diff --git a/tests/functional/conftest.py b/tests/functional/conftest.py index 5a0cf74..8cebba0 100644 --- a/tests/functional/conftest.py +++ b/tests/functional/conftest.py @@ -25,7 +25,6 @@ def reset_gitlab(gl: gitlab.Gitlab) -> None: # NOTE(jlvillal): By default in GitLab EE it will wait 7 days before # deleting a group. Change it to 0 days. settings = gl.settings.get() - logging.info(f"deletion_adjourned_period: {settings.deletion_adjourned_period}") if settings.deletion_adjourned_period != 0: logging.info("Setting deletion_adjourned_period to 0") settings.deletion_adjourned_period = 0 @@ -204,6 +203,11 @@ def is_gitlab_ee(gl: gitlab.Gitlab) -> bool: @pytest.fixture(scope="session") +def gitlab_ee(gl) -> bool: + return is_gitlab_ee(gl=gl) + + +@pytest.fixture(scope="session") def gitlab_runner(gl): container = "gitlab-runner-test" runner_name = "python-gitlab-runner" |