Render errors if test report artifacts are expired
requested to merge morefice/ui-should-explain-if-no-junit-report-artifacts-are-available-to-populate-unit-test-report into master
Ref: #296963 (closed)
What does this MR do and why?
This MR renders an error when test report artifacts
have expired.
This change is behind the ci_test_report_artifacts_expired
feature flag.
This will be used by the frontend to display an empty state as you can see on this design in a follow up MR.
Screenshots or screen recordings
artifact expired | endpoint | JSON response |
---|---|---|
projects/-/:id/pipelines/:pipeline_id/tests/suite-name.json?build_ids=1,2 |
||
projects/-/:id/pipelines/:pipeline_id/tests/suite-name.json?build_ids=1,2 |
How to set up and validate locally
- Create a job which generate a junit artifact
- Sets expire_in keyword for your job
- Here a snippet of the artifact I've created in my
.gitlatb-ci.yml
(I've uploadedoutput.xml
directly)
test:
script:
- echo "testing junit report"
artifacts:
reports:
junit:
- output.xml
expire_in: 42 seconds
- Verify
expired_artifacts
is exposed in thetest_suite
payload
$ curl http://127.0.0.1:3000/root/test-junit/-/pipelines/241/tests/suite-name.json?build_ids=777
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Max Orefice