Skip to content

Commit a0f5085

Browse files
committed
test: allowlist is on job_token_scope
Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk>
1 parent 21f1452 commit a0f5085

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

tests/functional/api/test_ci_cd_allowlist.py renamed to tests/functional/api/test_project_.job_token_scope.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
def test_add_project_to_ci_cd_token_allowlist(gl, project):
1+
def test_add_project_to_job_token_scope_allowlist(gl, project):
22
project_to_add = gl.projects.create({"name": "Ci_Cd_token_add_proj"})
33

4-
resp = project.allowlist.create({"target_project_id": project_to_add.id})
4+
resp = project.job_token_scope.allowlist.create(
5+
{"target_project_id": project_to_add.id}
6+
)
57

68
assert resp.source_project_id == project.id
79
assert resp.target_project_id == project_to_add.id
810

911
project_to_add.delete()
1012

1113

12-
def test_projects_ci_cd_token_allowlist_contains_added_project_name(gl, project):
13-
allowlist = project.allowlist.list()
14+
def test_projects_job_token_scope_allowlist_contains_added_project_name(gl, project):
15+
allowlist = project.job_token_scope.allowlist.list()
1416
assert len(allowlist) == 0
1517

1618
project_name = "Ci_Cd_token_named_proj"
@@ -23,8 +25,8 @@ def test_projects_ci_cd_token_allowlist_contains_added_project_name(gl, project)
2325
project_to_add.delete()
2426

2527

26-
def test_remove_project_by_id_from_projects_ci_cd_token_allowlist(gl, project):
27-
allowlist = project.allowlist.list()
28+
def test_remove_project_by_id_from_projects_job_token_scope_allowlist(gl, project):
29+
allowlist = project.job_token_scope.allowlist.list()
2830
assert len(allowlist) == 0
2931

3032
project_to_add = gl.projects.create({"name": "Ci_Cd_token_remove_proj"})

0 commit comments

Comments
 (0)