summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-10-24 17:28:19 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-10-24 17:28:19 +0000
commit0c2b07bfcb884e2b1ab6b5521596423578a3cdf8 (patch)
treee141bb9c790d02bdcae6d3d66f563c94475a9d51 /spec/lib/gitlab
parenta77c4d2dce9e77e7104f009822faf56063a37dea (diff)
downloadgitlab-ce-0c2b07bfcb884e2b1ab6b5521596423578a3cdf8.tar.gz
Add latest changes from gitlab-org/gitlab@15-5-stable-ee
Diffstat (limited to 'spec/lib/gitlab')
-rw-r--r--spec/lib/gitlab/kas/client_spec.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/lib/gitlab/kas/client_spec.rb b/spec/lib/gitlab/kas/client_spec.rb
index 5b89023cc13..9a0fa6c4067 100644
--- a/spec/lib/gitlab/kas/client_spec.rb
+++ b/spec/lib/gitlab/kas/client_spec.rb
@@ -111,11 +111,16 @@ RSpec.describe Gitlab::Kas::Client do
describe 'with grpcs' do
let(:stub) { instance_double(Gitlab::Agent::ConfigurationProject::Rpc::ConfigurationProject::Stub) }
+ let(:credentials) { instance_double(GRPC::Core::ChannelCredentials) }
let(:kas_url) { 'grpcs://example.kas.internal' }
- it 'uses a ChannelCredentials object' do
+ it 'uses a ChannelCredentials object with the correct certificates' do
+ expect(GRPC::Core::ChannelCredentials).to receive(:new)
+ .with(Gitlab::X509::Certificate.ca_certs_bundle)
+ .and_return(credentials)
+
expect(Gitlab::Agent::ConfigurationProject::Rpc::ConfigurationProject::Stub).to receive(:new)
- .with('example.kas.internal', instance_of(GRPC::Core::ChannelCredentials), timeout: described_class::TIMEOUT)
+ .with('example.kas.internal', credentials, timeout: described_class::TIMEOUT)
.and_return(stub)
allow(stub).to receive(:list_agent_config_files)