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
78
78
)
79
79
80
80
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
+ )
82
85
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:
131
131
assert files_to_upload [0 ][1 ][1 ].closed
132
132
133
133
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="
135
139
respx_mock .post (
136
140
"/v1/repos/user/repo/ci_issues_upload" ,
137
141
).respond (
138
142
200 ,
139
- json = {"gigid" : "1234azertyuiop" },
143
+ json = {"gigid" : gigid },
140
144
)
141
145
142
146
await junit_upload_mod .upload (
@@ -149,6 +153,12 @@ async def test_junit_upload(respx_mock: respx.MockRouter) -> None:
149
153
(str (REPORT_XML ),),
150
154
)
151
155
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
+
152
162
153
163
async def test_junit_upload_http_error (respx_mock : respx .MockRouter ) -> None :
154
164
respx_mock .post ("/v1/repos/user/repo/ci_issues_upload" ).respond (
You can’t perform that action at this time.
0 commit comments