Skip to content

Commit 10987b3

Browse files
test(ee): add an EE specific test
1 parent 17c01ea commit 10987b3

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

tests/functional/api/test_groups.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,9 @@ def test_group_subgroups_projects(gl, user):
218218
group4.delete()
219219

220220

221-
@pytest.mark.skip
222-
def test_group_wiki(group):
221+
def test_group_wiki(gitlab_ee, group):
222+
if not gitlab_ee:
223+
pytest.skip("Requires GitLab EE to run")
223224
content = "Group Wiki page content"
224225
wiki = group.wikis.create({"title": "groupwikipage", "content": content})
225226
assert wiki in group.wikis.list()
@@ -234,8 +235,9 @@ def test_group_wiki(group):
234235
assert wiki not in group.wikis.list()
235236

236237

237-
@pytest.mark.skip(reason="EE feature")
238-
def test_group_hooks(group):
238+
def test_group_hooks(gitlab_ee, group):
239+
if not gitlab_ee:
240+
pytest.skip("Requires GitLab EE to run")
239241
hook = group.hooks.create({"url": "http://hook.url"})
240242
assert hook in group.hooks.list()
241243

tests/functional/conftest.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ def reset_gitlab(gl: gitlab.Gitlab) -> None:
2525
# NOTE(jlvillal): By default in GitLab EE it will wait 7 days before
2626
# deleting a group. Change it to 0 days.
2727
settings = gl.settings.get()
28-
logging.info(f"deletion_adjourned_period: {settings.deletion_adjourned_period}")
2928
if settings.deletion_adjourned_period != 0:
3029
logging.info("Setting deletion_adjourned_period to 0")
3130
settings.deletion_adjourned_period = 0
@@ -203,6 +202,11 @@ def is_gitlab_ee(gl: gitlab.Gitlab) -> bool:
203202
return False
204203

205204

205+
@pytest.fixture(scope="session")
206+
def gitlab_ee(gl) -> bool:
207+
return is_gitlab_ee(gl=gl)
208+
209+
206210
@pytest.fixture(scope="session")
207211
def gitlab_runner(gl):
208212
container = "gitlab-runner-test"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy