-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Kuadrant version to pytest report #511
Conversation
02f333e
to
ced4803
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will the image show up on report portal?
In this state no, as the pytest report header is not included in the junit export, I am investigating how to add this. |
I tried adding this fixture which adds property info to junit file but report portal is not displaying it. Maybe in the future when report portal starts displaying this additional info we can add this, otherwise I did not find any other simple way. @pytest.fixture(scope="session", autouse=True)
def log_global_env_facts(record_testsuite_property):
"""Adds Kuadrant version in property of testcase in junit."""
for i, image in enumerate(kuadrant_version()):
record_testsuite_property(f"KUADRANT_{i}", image[0]) |
ced4803
to
88797f0
Compare
^ I added just the image info to metadata data structure which will be displayed in "Environment" section when generating html report. |
88797f0
to
6865610
Compare
@azgabur I tried using |
In the end I did not implement the junit property carrying the kuadrant image string as the Report portal did not display it so thats why its not included. But just by adding this function (#511 (comment)) to top level conftest it can be later added if needed. |
Ah, ok, sorry, I did not get that. If this meant to be about html only, it looks good to me then. |
Signed-off-by: Alex Zgabur <[email protected]>
6865610
to
bb240f4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving again, it works for HTML report.
This change will add image strings of deployed Kuadrants on clusters (including second cluster if defined) in pytest report header when running testsuite with make targets. This string is taken from CatalogSource object and in case the object is not found, no string will be printed. In the future this can be expanded for Kind setup, or doing smarter job in finding the right CatalogSource.
This can make debugging easier and is mostly helpful for figuring out nightly build version as the version string in Kuadrant subscription object is "0.0.0".