diff options
author | Thong Kuah <tkuah@gitlab.com> | 2018-10-23 13:52:34 +0300 |
---|---|---|
committer | Thong Kuah <tkuah@gitlab.com> | 2018-10-23 13:52:34 +0300 |
commit | a5419138fd1dd766713a3754c8406133b3d9b99b (patch) | |
tree | 563efbb8e705745f63148821e92e930bc4eb3286 /spec/lib/gitlab/kubernetes/kube_client_spec.rb | |
parent | 170071e365040e6a802918f23f80f7850d1f4bb5 (diff) |
Store version within SUPPORTED_API_GROUPS hash
This removes the ability to pass in a different version. We can instead
create a new entry in the SUPPORTED_API_GROUPS hash for a different
version if need be.
Diffstat (limited to 'spec/lib/gitlab/kubernetes/kube_client_spec.rb')
-rw-r--r-- | spec/lib/gitlab/kubernetes/kube_client_spec.rb | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/spec/lib/gitlab/kubernetes/kube_client_spec.rb b/spec/lib/gitlab/kubernetes/kube_client_spec.rb index ba38e2c31ea..eed4135d8a2 100644 --- a/spec/lib/gitlab/kubernetes/kube_client_spec.rb +++ b/spec/lib/gitlab/kubernetes/kube_client_spec.rb @@ -6,10 +6,9 @@ describe Gitlab::Kubernetes::KubeClient do include KubernetesHelpers let(:api_url) { 'https://kubernetes.example.com/prefix' } - let(:api_version) { 'v1' } let(:kubeclient_options) { { auth_options: { bearer_token: 'xyz' } } } - let(:client) { described_class.new(api_url, api_version, kubeclient_options) } + let(:client) { described_class.new(api_url, kubeclient_options) } before do stub_kubeclient_discover(api_url) @@ -37,14 +36,6 @@ describe Gitlab::Kubernetes::KubeClient do it 'has the api_version' do expect(subject.instance_variable_get(:@api_version)).to eq('v1') end - - context 'different api version' do - subject { client.core_client(api_version: 'v2') } - - it 'has the api_version' do - expect(subject.instance_variable_get(:@api_version)).to eq('v2') - end - end end describe '#rbac_client' do @@ -59,14 +50,6 @@ describe Gitlab::Kubernetes::KubeClient do it 'has the api_version' do expect(subject.instance_variable_get(:@api_version)).to eq('v1') end - - context 'different api version' do - subject { client.rbac_client(api_version: 'v2') } - - it 'has the api_version' do - expect(subject.instance_variable_get(:@api_version)).to eq('v2') - end - end end describe '#extensions_client' do @@ -81,14 +64,6 @@ describe Gitlab::Kubernetes::KubeClient do it 'has the api_version' do expect(subject.instance_variable_get(:@api_version)).to eq('v1beta1') end - - context 'different api version' do - subject { client.extensions_client(api_version: 'v2') } - - it 'has the api_version' do - expect(subject.instance_variable_get(:@api_version)).to eq('v2') - end - end end describe 'core API' do @@ -146,7 +121,6 @@ describe Gitlab::Kubernetes::KubeClient do describe 'extensions API group' do let(:api_groups) { ['apis/extensions'] } - let(:api_version) { 'v1beta1' } let(:extensions_client) { client.extensions_client } describe '#get_deployments' do |