summaryrefslogtreecommitdiff
path: root/spec/services/ci
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2017-10-04 22:40:12 +0900
committerShinya Maeda <shinya@gitlab.com>2017-10-04 22:40:12 +0900
commita644f4b829080d603405c6eee73a88e2be5cf929 (patch)
treef050264bffc9ac43d600747cb3e43d734bc4fd6b /spec/services/ci
parentea4af856e49cf5933b6995965fa7d6b922e38c20 (diff)
downloadgitlab-ce-a644f4b829080d603405c6eee73a88e2be5cf929.tar.gz
Add spec/models/gcp/cluster_spec.rb
Diffstat (limited to 'spec/services/ci')
-rw-r--r--spec/services/ci/create_cluster_service_spec.rb19
-rw-r--r--spec/services/ci/fetch_gcp_operation_service_spec.rb17
-rw-r--r--spec/services/ci/fetch_kubernetes_token_service_spec.rb17
-rw-r--r--spec/services/ci/finalize_cluster_creation_service_spec.rb17
-rw-r--r--spec/services/ci/integrate_cluster_service_spec.rb17
-rw-r--r--spec/services/ci/provision_cluster_service_spec.rb17
-rw-r--r--spec/services/ci/update_cluster_service_spec.rb17
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