action #179708
opencoordination #127031: [saga][epic] openQA for SUSE customers
coordination #165393: [epic] Improved code coverage in openQA
Ensure clean git status in openQA tests
0%
Description
Motivation¶
In os-autoinst we already have OpenQA::Test::CheckGitStatus . How about we move this module to https://github.com/os-autoinst/os-autoinst-common/ and use it in openQA as well to ensure a clean working copy directory during testing.
Updated by okurz 3 days ago
- Copied from action #178207: t: Many leftover t/poolXXXX directories in openQA size:S added
Updated by tinita 2 days ago
I think it would be good to have it on CPAN instead.
I was experimenting with that, but there are two options: Either it works like it does now (running in an END
block), or it is implemented in the same way as Test::Warnings
, which does the check before the test exits and adjusts the test plan.
The disadvantage of that is that it would break in cases where we have a temp dir or file in the git worktree and remove it as part of the global construction phase. Then the check would run too early and still see a dirty git status. However, it could be a goal to never add any file in the git worktree.
So I'm thinking of keeping that idea open and make both implementations possible to use. Just thinking about the naming. I think it's cleaner to have the two variants in different module files.