Commit 88479f7f authored by Rémy Coutable's avatar Rémy Coutable

Merge branch '24599-spec-lib-gitlab-backend-shell_spec-rb-causes-other-specs-to-fail' into 'master'

Resolve "spec/lib/gitlab/backend/shell_spec.rb causes other specs to fail"

## What does this MR do?

It ensures we rely on `Gitlab::Shell`'s public API and not on its internal. Since `Gitlab::Shell` is caching the value of its token, the only way to get the correct token is to call `Gitlab::Shell.secret_token`, not to read the `Gitlab.config.gitlab_shell.secret_file` file!

Fixes #24599

See merge request !7557
parents 9d4a45ef 2fb862cc
......@@ -5,7 +5,7 @@ describe API::API, api: true do
let(:user) { create(:user) }
let(:key) { create(:key, user: user) }
let(:project) { create(:project) }
let(:secret_token) { File.read Gitlab.config.gitlab_shell.secret_file }
let(:secret_token) { Gitlab::Shell.secret_token }
describe "GET /internal/check", no_db: true do
it do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment