summaryrefslogtreecommitdiff
path: root/spec/lib/google_api
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2018-03-16 17:50:48 +0100
committerMatija Čupić <matteeyah@gmail.com>2018-03-16 17:50:48 +0100
commit45b3bcc39631729ce573210ef6201c2cc59d7cdb (patch)
treef2ce89c40bcaa774b38bba923b848711725b049f /spec/lib/google_api
parent78fb81e68676fb526e09cadac36045d9cf85e860 (diff)
downloadgitlab-ce-45b3bcc39631729ce573210ef6201c2cc59d7cdb.tar.gz
Add zones_list and machine_types_list to Google Cloud API client
Diffstat (limited to 'spec/lib/google_api')
-rw-r--r--spec/lib/google_api/cloud_platform/client_spec.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/lib/google_api/cloud_platform/client_spec.rb b/spec/lib/google_api/cloud_platform/client_spec.rb
index db9d9158b29..040cbda9468 100644
--- a/spec/lib/google_api/cloud_platform/client_spec.rb
+++ b/spec/lib/google_api/cloud_platform/client_spec.rb
@@ -74,6 +74,30 @@ describe GoogleApi::CloudPlatform::Client do
it { is_expected.to eq(billing_info) }
end
+ describe '#projects_zones_list' do
+ subject { client.projects_zones_list('project') }
+ let(:zones) { double }
+
+ before do
+ allow_any_instance_of(Google::Apis::ComputeV1::ComputeService)
+ .to receive(:fetch_all).and_return(zones)
+ end
+
+ it { is_expected.to eq(zones) }
+ end
+
+ describe '#projects_zones_machine_types_list' do
+ subject { client.projects_zones_machine_types_list('project', 'zone') }
+ let(:machine_types) { double }
+
+ before do
+ allow_any_instance_of(Google::Apis::ComputeV1::ComputeService)
+ .to receive(:fetch_all).and_return(machine_types)
+ end
+
+ it { is_expected.to eq(machine_types) }
+ end
+
describe '#projects_zones_clusters_get' do
subject { client.projects_zones_clusters_get(spy, spy, spy) }
let(:gke_cluster) { double }