Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit06266ea

Browse files
TimKnight-DWPnejch
authored andcommitted
test: tidy up functional tests
Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk>
1 parent4bef473 commit06266ea

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

‎tests/functional/api/test_deploy_tokens.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def test_project_deploy_tokens(gl, project):
1616

1717
deploy_token=project.deploytokens.get(deploy_token.id)
1818
assertdeploy_token.name=="foo"
19-
assertdeploy_token.expires_at==today+"T00:00:00.000Z"
19+
assertdeploy_token.expires_at==f"{today}T00:00:00.000Z"
2020
assertdeploy_token.scopes== ["read_registry"]
2121
assertdeploy_token.username=="bar"
2222

‎tests/functional/cli/test_cli_repository.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ def test_list_merge_request_commits(gitlab_cli, merge_request, project):
7777

7878

7979
deftest_commit_merge_requests(gitlab_cli,project,merge_request):
80+
"""This tests the `project-commit merge-requests` command and also tests
81+
that we can print the result using the `json` formatter"""
82+
8083
# Pause to let GL catch up (happens on hosted too, sometimes takes a while for server to be ready to merge)
8184
time.sleep(30)
8285

‎tests/functional/cli/test_cli_v4.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
importos
33
importtime
44

5-
branch="branch-cli-v4"
5+
branch="BRANCH-cli-v4"
66

77

88
deftest_create_project(gitlab_cli):
@@ -243,6 +243,8 @@ def test_accept_request_merge(gitlab_cli, project):
243243
# Pause to let GL catch up (happens on hosted too, sometimes takes a while for server to be ready to merge)
244244
time.sleep(30)
245245

246+
mr=project.mergerequests.get(mr.iid)
247+
246248
ifmr.detailed_merge_status=="not_approved":
247249
approve_cmd= [
248250
"project-merge-request",

‎tests/functional/conftest.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -389,9 +389,6 @@ def _make_merge_request(*, source_branch: str, create_pipeline: bool = False):
389389
}
390390
)
391391

392-
# Helps with Debugging why MRs fail to merge resulting in 405 from downstream tests
393-
project.approvalrules.list()
394-
395392
ifcreate_pipeline:
396393
project.files.create(
397394
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp