Resolve "`bin/rspec`/`bin/karma` can nuke the GDK entirely"
What does this MR do?
This implements 3 level of safety to ensure we don't accidentally nuke the whole GDK installation dir.
- Ensure
RAILS_ENV
is set totest
inspec/spec_helper.rb
- Abort
TestEnv.init
ifRAILS_ENV
is nottest
- Ensure the Gitaly/GiLab Shell install dirs are well named (so that if the path is somehow wrong, e.g.
gdk
, we abort and don't accidentally remove a wrong install dir).
Are there points in the code the reviewer needs to double check?
I've refactored the Gitaly & GitLab Shell setup methods, they still work after rm -rf tmp/tests
, though.
Does this MR meet the acceptance criteria?
- Review
-
Has been reviewed by Backend
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together
What are the relevant issue numbers?
Closes #37872 (closed)