Open petr-balogh opened 1 week ago
@petr-balogh
We are doing things in a similar fashion for ocs and mcg logs collection. I assume we will markers for each of these applied to the appropriate tests?
ocs_logs_collection = (
False
if any(x in item.location[0] for x in ["_ui", "must_gather"])
else True
)
mcg_logs_collection = (
True if any(x in item.location[0] for x in ["mcg", "ecosystem"]) else False
)
yes for ecosystem we can make like in example above for ocp_logs_collection as well I think if that's the question. For others, we can have new explicit marker. And once it exists - we can ask owners who require OCP MG to be collected when their test will fail, that they will apply that marker over their test case which requires this.
With change of directory structure, the logic we had implemented here: https://github.com/red-hat-storage/ocs-ci/blob/b80d0e9d2b4836d414949118fbe47d521bf85766/ocs_ci/framework/pytest_customization/ocscilib.py#L715-L718
To collect logs for OCP based on test path doesn't work anymore.
I propose to use the specific marker for tests which requires OCP must gather. Something like
So we can decorate those tests which requires this and instead of path, to check if test item has that mark.
Or we can include some other marks like
@purple_squad
As I would like to have OCP Must gather for all our purple squad tests collected always.