diff options
author | Alessio Caiazza <acaiazza@gitlab.com> | 2017-11-06 17:33:56 +0100 |
---|---|---|
committer | Alessio Caiazza <acaiazza@gitlab.com> | 2017-11-06 17:33:56 +0100 |
commit | 338d7612bcbb27b27cc0b9eadedf2a15c00c3e71 (patch) | |
tree | 45fbb2c5f1b5bc7f424ce8bd73809efce572bfd6 /spec/services | |
parent | 2802b5bb52b6ba28e6eeb1813f3fd3a79d2c03c4 (diff) | |
parent | a99ad59e655d66fda8af7f2b89aced79b8bc1060 (diff) | |
download | gitlab-ce-338d7612bcbb27b27cc0b9eadedf2a15c00c3e71.tar.gz |
Merge branch 'refactor-clusters' into 38464-k8s-apps
Diffstat (limited to 'spec/services')
4 files changed, 3 insertions, 56 deletions
diff --git a/spec/services/clusters/create_service_spec.rb b/spec/services/clusters/create_service_spec.rb index 9c2c288a2fa..5b6edb73beb 100644 --- a/spec/services/clusters/create_service_spec.rb +++ b/spec/services/clusters/create_service_spec.rb @@ -61,57 +61,4 @@ describe Clusters::CreateService do end end end - - # TODO: This will be active in 10.3 - # context 'when provider is user' do - # context 'when correct params' do - # let(:params) do - # { - # name: 'test-cluster', - # platform_type: :kubernetes, - # provider_type: :user, - # platform_kubernetes_attributes: { - # namespace: 'custom-namespace', - # api_url: 'https://111.111.111.111', - # token: 'token' - # } - # } - # end - - # it 'creates a cluster object and performs a worker' do - # expect(ClusterProvisionWorker).to receive(:perform_async) - - # expect { result } - # .to change { Clusters::Cluster.count }.by(1) - # .and change { Clusters::Platforms::Kubernetes.count }.by(1) - - # expect(result.name).to eq('test-cluster') - # expect(result.user).to eq(user) - # expect(result.project).to eq(project) - # expect(result.provider).to be_nil - # expect(result.platform.namespace).to eq('custom-namespace') - # end - # end - - # context 'when invalid params' do - # let(:params) do - # { - # name: 'test-cluster', - # platform_type: :kubernetes, - # provider_type: :user, - # platform_kubernetes_attributes: { - # namespace: 'custom-namespace', - # api_url: '!!!!!', - # token: 'token' - # } - # } - # end - - # it 'returns an error' do - # # expect(ClusterProvisionWorker).not_to receive(:perform_async) - # expect { result }.to change { Clusters::Cluster.count }.by(0) - # expect(result.errors[:"platform_kubernetes.api_url"]).to be_present - # end - # end - # end end diff --git a/spec/services/clusters/gcp/fetch_operation_service_spec.rb b/spec/services/clusters/gcp/fetch_operation_service_spec.rb index 20d46608033..e2fa93904c5 100644 --- a/spec/services/clusters/gcp/fetch_operation_service_spec.rb +++ b/spec/services/clusters/gcp/fetch_operation_service_spec.rb @@ -4,7 +4,7 @@ describe Clusters::Gcp::FetchOperationService do include GoogleApi::CloudPlatformHelpers describe '#execute' do - let(:provider) { create(:provider_gcp, :creating) } + let(:provider) { create(:cluster_provider_gcp, :creating) } let(:gcp_project_id) { provider.gcp_project_id } let(:zone) { provider.zone } let(:operation_id) { provider.operation_id } diff --git a/spec/services/clusters/gcp/provision_service_spec.rb b/spec/services/clusters/gcp/provision_service_spec.rb index f5f9d4800fd..f48afdc83b2 100644 --- a/spec/services/clusters/gcp/provision_service_spec.rb +++ b/spec/services/clusters/gcp/provision_service_spec.rb @@ -4,7 +4,7 @@ describe Clusters::Gcp::ProvisionService do include GoogleApi::CloudPlatformHelpers describe '#execute' do - let(:provider) { create(:provider_gcp, :scheduled) } + let(:provider) { create(:cluster_provider_gcp, :scheduled) } let(:gcp_project_id) { provider.gcp_project_id } let(:zone) { provider.zone } diff --git a/spec/services/clusters/gcp/verify_provision_status_service_spec.rb b/spec/services/clusters/gcp/verify_provision_status_service_spec.rb index 666fcf13cac..2ee2fa51f63 100644 --- a/spec/services/clusters/gcp/verify_provision_status_service_spec.rb +++ b/spec/services/clusters/gcp/verify_provision_status_service_spec.rb @@ -4,7 +4,7 @@ describe Clusters::Gcp::VerifyProvisionStatusService do include GoogleApi::CloudPlatformHelpers describe '#execute' do - let(:provider) { create(:provider_gcp, :creating) } + let(:provider) { create(:cluster_provider_gcp, :creating) } let(:gcp_project_id) { provider.gcp_project_id } let(:zone) { provider.zone } let(:operation_id) { provider.operation_id } |