feat: add web_link field to Result for browsable test links#4878
feat: add web_link field to Result for browsable test links#4878kamaxeon wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
Add a source_url field to the Result class, populate it using invocation.test.web_link(), and include unit tests for serialization. Strengthen the assertion in test_result_source_url_none_roundtrip by checking for the key's absence in the serialized output to avoid ambiguity.
|
b0b7934 to
c88f976
Compare
c88f976 to
1b7af1d
Compare
|
/packit build |
1b7af1d to
b1ba746
Compare
|
I just updated the MR request to fix a failing test on Fedora and CentOS. |
CI StatusThe two remaining failures are not related to this PR:
All |
* Add `web_link` field to the `Result` dataclass, serialized as `web-link` in `results.yaml` * Populate the field via `Test.web_link()` in `from_test_invocation()` * Add `web-link` to the results JSON schema (`results.yaml`) * Add spec example in `spec/results.fmf` * Fix `test_result_web_link_none_roundtrip` to match serialization framework behavior (None values are serialized, not omitted) * Add `test_result_web_link_missing_in_serialized` for backward compatibility with old results lacking `web-link` Ref: TFT-2683 Signed-off-by: Israel Santana Aleman <isantana@redhat.com>
b1ba746 to
5aaa518
Compare
Summary
Add a
web_linkfield to theResultdataclass intmt/result.pythat serializesthe browsable test source URL directly into
results.yamlasweb-link, so downstreamconsumers (gluetools, kcidb) get a ready-to-use link instead of having to reconstruct it
from
fmf-id.Core.web_link()method andtmt test showoutputTest.web_link()infrom_test_invocation()Nonefor local tests / shell discover (no URL available)Example output in results.yaml
Ref: TFT-2683
Pull Request Checklist