Update gitlab_spec to reduce brittleness
What does this MR do and why?
The current set of specs on gitlab_spec are brittle and break each time you try to make any modification to process_exec_commands
- they make assertions that methods are called specific number of times
- they assume that values will be empty/not empty
Rework these specs to make them more concise in their expectations, without the brittleness so we can expand gitlab.rb process_exec_commands without having to tweak a suite of e2e tests each time.
When reworking these, I noted that the implementation of
How to set up and validate locally
- Run rspecs
- Verify that moving add_git_server_hooks is still executed and adds the pre-receive hook script to the containers.
- We can see them still happening in the startup of the jobs
- it should be called once per gitlab/gitaly container
- environments using gitaly-cluster will have 4 called (3gitaly + 1gitlab)
- other environments will have a single call (1*gitlab)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by George Koltsov