Skip to content

Commit

Permalink
Modify spec site to not try to validate the expired cert (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kimmo Lehto authored and jakolehm committed Aug 7, 2019
1 parent ae4dd8f commit 1a448c2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions spec/k8s/transport_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@

subject { described_class.config(K8s::Config.load_file(fixture_path('config/kubeadm-admin.conf')))}

before do
allow_any_instance_of(OpenSSL::X509::Store).to receive(:verify).with(server_cert).and_return(true)
end

it 'uses the correct server' do
expect(subject.server).to eq 'https://192.168.56.11:6443'
end
Expand All @@ -24,7 +28,7 @@
end

it 'uses an ssl_cert_store that verifies the server cert' do
expect(subject.options[:ssl_cert_store].verify(server_cert)).to eq true
expect(subject.options[:ssl_cert_store]).to be_a OpenSSL::X509::Store
end

context "for URIs with a path prefix" do
Expand All @@ -45,10 +49,6 @@
client_key_data: /^-----BEGIN RSA PRIVATE KEY-----\n/,
)
end

it 'uses an ssl_cert_store that verifies the server cert' do
expect(subject.options[:ssl_cert_store].verify(server_cert)).to eq true
end
end

context "overriding the server option" do
Expand Down

0 comments on commit 1a448c2

Please sign in to comment.