Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mr_test: Add wildcard support to cleanupMR()
The problem with cmd/mr_test.go:cleanupMR() is that the way it is called is insufficient to clean up a failed test. The sequence that is leading to failures is, for example, test run #1: Test_mrCmd() runs. Test_mrCmd_MR_description_and_options() runs and fails leaving, for example, a Merge Request with description "Fancy Description". test run #1 fails. test run #2: Test_mrCmd() runs and fails because a Merge Request with description "Fancy Description" exists. It is not "found" by the cleanupMR() function because Test_mrCmd()'s call is looking for a description of "mr title". test run #2 fails. test run #3 (with my changes from the first commit) cleans things up. test run #3 fails. test run #4 should succeed. This is a painful way to test. Since only one MR is created at a time for the test branch the code should just clean up any existing MR. Add wildcard support to the cleanupMR() function. Signed-off-by: Prarit Bhargava <prarit@redhat.com>
- Loading branch information