Skip to content

Commit efe6a7c

Browse files
committed
fix: access token tests, requires expires_at in GL 16
Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk>
1 parent 92125b5 commit efe6a7c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/functional/cli/test_cli_resource_access_tokens.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import pytest
1+
from datetime import date
22

33

44
def test_list_project_access_tokens(gitlab_cli, project):
@@ -18,13 +18,14 @@ def test_create_project_access_token_with_scopes(gitlab_cli, project):
1818
"test-token",
1919
"--scopes",
2020
"api,read_repository",
21+
"--expires-at",
22+
date.today().isoformat(),
2123
]
2224
ret = gitlab_cli(cmd)
2325

2426
assert ret.success
2527

2628

27-
@pytest.mark.skip(reason="Requires GitLab 14.7")
2829
def test_list_group_access_tokens(gitlab_cli, group):
2930
cmd = ["group-access-token", "list", "--group-id", group.id]
3031
ret = gitlab_cli(cmd)
@@ -42,6 +43,8 @@ def test_create_group_access_token_with_scopes(gitlab_cli, group):
4243
"test-token",
4344
"--scopes",
4445
"api,read_repository",
46+
"--expires-at",
47+
date.today().isoformat(),
4548
]
4649
ret = gitlab_cli(cmd)
4750

0 commit comments

Comments
 (0)