diff options
Diffstat (limited to 'spec/services/ci')
-rw-r--r-- | spec/services/ci/create_cluster_service_spec.rb | 19 | ||||
-rw-r--r-- | spec/services/ci/fetch_gcp_operation_service_spec.rb | 17 | ||||
-rw-r--r-- | spec/services/ci/fetch_kubernetes_token_service_spec.rb | 17 | ||||
-rw-r--r-- | spec/services/ci/finalize_cluster_creation_service_spec.rb | 17 | ||||
-rw-r--r-- | spec/services/ci/integrate_cluster_service_spec.rb | 17 | ||||
-rw-r--r-- | spec/services/ci/provision_cluster_service_spec.rb | 17 | ||||
-rw-r--r-- | spec/services/ci/update_cluster_service_spec.rb | 17 |
7 files changed, 121 insertions, 0 deletions
diff --git a/spec/services/ci/create_cluster_service_spec.rb b/spec/services/ci/create_cluster_service_spec.rb new file mode 100644 index 00000000000..eaa27eb4cc3 --- /dev/null +++ b/spec/services/ci/create_cluster_service_spec.rb @@ -0,0 +1,19 @@ +require 'spec_helper' + +describe Ci::CreateClusterService do + describe '#execute' do + let(:access_token) { 'xxx' } + + context 'when correct params' do + it 'creates a cluster object' do + + end + end + + context 'when invalid params' do + it 'returns an error' do + + end + end + end +end diff --git a/spec/services/ci/fetch_gcp_operation_service_spec.rb b/spec/services/ci/fetch_gcp_operation_service_spec.rb new file mode 100644 index 00000000000..13141d81ab8 --- /dev/null +++ b/spec/services/ci/fetch_gcp_operation_service_spec.rb @@ -0,0 +1,17 @@ +require 'spec_helper' + +describe Ci::FetchGcpOperationService do + describe '#execute' do + context 'when correct params' do + it 'fetch the gcp operaion' do + + end + end + + context 'when invalid params' do + it 'sets an error to cluster object' do + + end + end + end +end diff --git a/spec/services/ci/fetch_kubernetes_token_service_spec.rb b/spec/services/ci/fetch_kubernetes_token_service_spec.rb new file mode 100644 index 00000000000..b66b5a7947d --- /dev/null +++ b/spec/services/ci/fetch_kubernetes_token_service_spec.rb @@ -0,0 +1,17 @@ +require 'spec_helper' + +describe Ci::FetchKubernetesTokenService do + describe '#execute' do + context 'when correct params' do + it 'fetch the kubernetes token' do + + end + end + + context 'when invalid params' do + it 'returns nil' do + + end + end + end +end diff --git a/spec/services/ci/finalize_cluster_creation_service_spec.rb b/spec/services/ci/finalize_cluster_creation_service_spec.rb new file mode 100644 index 00000000000..81af15942c0 --- /dev/null +++ b/spec/services/ci/finalize_cluster_creation_service_spec.rb @@ -0,0 +1,17 @@ +require 'spec_helper' + +describe Ci::FinalizeClusterCreationService do + describe '#execute' do + context 'when correct params' do + it 'execute IntegrateClusterService' do + + end + end + + context 'when invalid params' do + it 'returns a cluster object with error' do + + end + end + end +end diff --git a/spec/services/ci/integrate_cluster_service_spec.rb b/spec/services/ci/integrate_cluster_service_spec.rb new file mode 100644 index 00000000000..7a8c80ca4e7 --- /dev/null +++ b/spec/services/ci/integrate_cluster_service_spec.rb @@ -0,0 +1,17 @@ +require 'spec_helper' + +describe Ci::IntegrateClusterService do + describe '#execute' do + context 'when correct params' do + it 'creates a cluster object' do + + end + end + + context 'when invalid params' do + it 'returns a cluster object with error' do + + end + end + end +end diff --git a/spec/services/ci/provision_cluster_service_spec.rb b/spec/services/ci/provision_cluster_service_spec.rb new file mode 100644 index 00000000000..d1595c8917d --- /dev/null +++ b/spec/services/ci/provision_cluster_service_spec.rb @@ -0,0 +1,17 @@ +require 'spec_helper' + +describe Ci::ProvisionClusterService do + describe '#execute' do + context 'when correct params' do + it 'creates a cluster on gke' do + + end + end + + context 'when invalid params' do + it 'returns a cluster object with error' do + + end + end + end +end diff --git a/spec/services/ci/update_cluster_service_spec.rb b/spec/services/ci/update_cluster_service_spec.rb new file mode 100644 index 00000000000..afe3d418a8e --- /dev/null +++ b/spec/services/ci/update_cluster_service_spec.rb @@ -0,0 +1,17 @@ +require 'spec_helper' + +describe Ci::UpdateClusterService do + describe '#execute' do + context 'when correct params' do + it 'updates the cluster and the service' do + + end + end + + context 'when invalid params' do + it 'returns a cluster object with error' do + + end + end + end +end |