提交 88479f7f 编写于 作者: R 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
......@@ -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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册