From 646018a40e7d29682f31e774f453a6b3427b4216 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Sun, 22 May 2016 14:14:12 -0500 Subject: Fix the CI login to Container Registry (the gitlab-ci-token user) --- spec/requests/jwt_controller_spec.rb | 2 +- spec/services/auth/container_registry_authentication_service_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'spec') diff --git a/spec/requests/jwt_controller_spec.rb b/spec/requests/jwt_controller_spec.rb index 7bb71365a48..d006ff195cf 100644 --- a/spec/requests/jwt_controller_spec.rb +++ b/spec/requests/jwt_controller_spec.rb @@ -23,7 +23,7 @@ describe JwtController do context 'when using authorized request' do context 'using CI token' do let(:project) { create(:empty_project, runners_token: 'token', builds_enabled: builds_enabled) } - let(:headers) { { authorization: credentials('gitlab_ci_token', project.runners_token) } } + let(:headers) { { authorization: credentials('gitlab-ci-token', project.runners_token) } } subject! { get '/jwt/auth', parameters, headers } diff --git a/spec/services/auth/container_registry_authentication_service_spec.rb b/spec/services/auth/container_registry_authentication_service_spec.rb index 73b8c3f048f..3f4a1ced2b6 100644 --- a/spec/services/auth/container_registry_authentication_service_spec.rb +++ b/spec/services/auth/container_registry_authentication_service_spec.rb @@ -127,12 +127,12 @@ describe Auth::ContainerRegistryAuthenticationService, services: true do context 'project authorization' do let(:current_project) { create(:empty_project) } - context 'disallow to use offline_token' do + context 'allow to use offline_token' do let(:current_params) do { offline_token: true } end - it_behaves_like 'an unauthorized' + it_behaves_like 'an authenticated' end context 'allow to pull and push images' do -- cgit v1.2.1