1
+ import pytest
2
+
3
+
4
+ # TODO: can be enabled when https://github.com/python-gitlab/python-gitlab/pull/2790 merged
5
+ @pytest .mark .xfail (reason = "project job_token_scope api only in 16.*" )
1
6
def test_add_project_to_job_token_scope_allowlist (gl ,project ):
2
7
project_to_add = gl .projects .create ({"name" :"Ci_Cd_token_add_proj" })
3
8
@@ -10,6 +15,7 @@ def test_add_project_to_job_token_scope_allowlist(gl, project):
10
15
project_to_add .delete ()
11
16
12
17
18
+ @pytest .mark .xfail (reason = "project job_token_scope api only in 16.*" )
13
19
def test_projects_job_token_scope_allowlist_contains_added_project_name (gl ,project ):
14
20
scope = project .job_token_scope .get ()
15
21
assert len (scope .allowlist .list ())== 0
@@ -24,6 +30,7 @@ def test_projects_job_token_scope_allowlist_contains_added_project_name(gl, proj
24
30
project_to_add .delete ()
25
31
26
32
33
+ @pytest .mark .xfail (reason = "project job_token_scope api only in 16.*" )
27
34
def test_remove_project_by_id_from_projects_job_token_scope_allowlist (gl ,project ):
28
35
scope = project .job_token_scope .get ()
29
36
assert len (scope .allowlist .list ())== 0