Fix file commit error for system cancels merge train spec
What does this MR do?
To address API error Fabrication of QA::Resource::Repository::Commit using the API failed (400) with {"message":"A file with this name already exists"}
#321464 (closed).
- In this solution, I explicitly created the file in master first.
- Make the file name to be a random string instead of hardcoded string.
- Small refactor to optimize the flow of the test.
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry
- [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
- [-] Separation of EE specific content
Related to #321464 (closed)
Edited by Tiffany Rea