Commit 2fb862cc authored by Rémy Coutable's avatar Rémy Coutable

Rely on Gitlab::Shell public API, not reading internal files it may use

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!
Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent ec3b1c6d
......@@ -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