summaryrefslogtreecommitdiff
path: root/spec/support/shared_contexts/requests/api/workhorse_shared_context.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/shared_contexts/requests/api/workhorse_shared_context.rb')
-rw-r--r--spec/support/shared_contexts/requests/api/workhorse_shared_context.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/support/shared_contexts/requests/api/workhorse_shared_context.rb b/spec/support/shared_contexts/requests/api/workhorse_shared_context.rb
new file mode 100644
index 00000000000..36be64339a2
--- /dev/null
+++ b/spec/support/shared_contexts/requests/api/workhorse_shared_context.rb
@@ -0,0 +1,6 @@
+# frozen_string_literal: true
+
+RSpec.shared_context 'workhorse headers' do
+ let(:workhorse_token) { JWT.encode({ 'iss' => 'gitlab-workhorse' }, Gitlab::Workhorse.secret, 'HS256') }
+ let(:workhorse_headers) { { 'GitLab-Workhorse' => '1.0', Gitlab::Workhorse::INTERNAL_API_REQUEST_HEADER => workhorse_token } }
+end