File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed
Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -78,5 +78,8 @@ async def upload( # noqa: PLR0913, PLR0917
7878 )
7979
8080 gigid = response.json()["gigid"]
81- console.log(f"::notice title=CI Issues report::CI_ISSUE_GIGID={gigid}")
81+ console.print(
82+ f"::notice title=CI Issues report::CI_ISSUE_GIGID={gigid}",
83+ soft_wrap=True,
84+ )
8285 console.log("[green]:tada: File(s) uploaded[/]")
Original file line number Diff line number Diff line change @@ -131,12 +131,16 @@ def test_get_files_to_upload() -> None:
131131 assert files_to_upload[0][1][1].closed
132132
133133
134- async def test_junit_upload(respx_mock: respx.MockRouter) -> None:
134+ async def test_junit_upload(
135+ respx_mock: respx.MockRouter,
136+ capsys: pytest.CaptureFixture[str],
137+ ) -> None:
138+ gigid = "eyJjaV9qb2JfaWQiOjcwNzQyLCJzaWduYXR1cmUiOiI2NjcxN2QwZDdiZjZkMzAxMmFmNGE4NWQ1YTFlZDhmYjNkNDBjYmM4MmZjZjgxZTVmNzEzNzEyZjRlZjIxOTFmIn0="
135139 respx_mock.post(
136140 "/v1/repos/user/repo/ci_issues_upload",
137141 ).respond(
138142 200,
139- json={"gigid": "1234azertyuiop" },
143+ json={"gigid": gigid },
140144 )
141145
142146 await junit_upload_mod.upload(
@@ -149,6 +153,12 @@ async def test_junit_upload(respx_mock: respx.MockRouter) -> None:
149153 (str(REPORT_XML),),
150154 )
151155
156+ captured = capsys.readouterr()
157+ assert (
158+ captured.out.split("\n")[0]
159+ == f"::notice title=CI Issues report::CI_ISSUE_GIGID={gigid}"
160+ )
161+
152162
153163async def test_junit_upload_http_error(respx_mock: respx.MockRouter) -> None:
154164 respx_mock.post("/v1/repos/user/repo/ci_issues_upload").respond(
You can’t perform that action at this time.
0 commit comments