summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaco Guzman <pacoguzmanp@gmail.com>2016-10-13 12:44:57 +0200
committerPaco Guzman <pacoguzmanp@gmail.com>2016-10-13 12:45:56 +0200
commit10f804812c2d7e28254ad0d0ed5f7906bbf7e768 (patch)
treeb375d4157124df7939f9b3f926c033a1d8d1dc6d
parent23a2a8ef3187f904cddccfd01ea8634f1f7bc8bc (diff)
downloadgitlab-ce-23288-ensure-deterministic-state.tar.gz
Ensure a deterministic global state on Gitlab::Shell specs23288-ensure-deterministic-state
-rw-r--r--spec/lib/gitlab/backend/shell_spec.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/lib/gitlab/backend/shell_spec.rb b/spec/lib/gitlab/backend/shell_spec.rb
index f826d0d1b04..aa8f49e727e 100644
--- a/spec/lib/gitlab/backend/shell_spec.rb
+++ b/spec/lib/gitlab/backend/shell_spec.rb
@@ -30,12 +30,14 @@ describe Gitlab::Shell, lib: true do
allow(Gitlab.config.gitlab_shell).to receive(:secret_file).and_return(secret_file)
allow(Gitlab.config.gitlab_shell).to receive(:path).and_return('tmp/tests/shell-secret-test')
FileUtils.mkdir('tmp/tests/shell-secret-test')
+ Gitlab::Shell.instance_eval { @secret_token = nil }
Gitlab::Shell.ensure_secret_token!
end
after do
FileUtils.rm_rf('tmp/tests/shell-secret-test')
FileUtils.rm_rf(secret_file)
+ Gitlab::Shell.instance_eval { @secret_token = nil }
end
it 'creates and links the secret token file' do