diff options
author | Dylan Griffith <dyl.griffith@gmail.com> | 2018-02-12 14:22:15 +1100 |
---|---|---|
committer | Dylan Griffith <dyl.griffith@gmail.com> | 2018-02-15 17:01:11 +1100 |
commit | c1828eaed56159998d1eaafdaa135f1b3480549b (patch) | |
tree | 8cd903c910454bfdbc2bfdb1b1e9709eaa5583f1 /spec/workers | |
parent | 5ca692b0b04b4f349fb5a08b9dcc7d87c774934e (diff) | |
download | gitlab-ce-c1828eaed56159998d1eaafdaa135f1b3480549b.tar.gz |
Persist external IP of ingress controller created for GKE (#42643)
Diffstat (limited to 'spec/workers')
-rw-r--r-- | spec/workers/cluster_wait_for_ingress_ip_address_worker_spec.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/workers/cluster_wait_for_ingress_ip_address_worker_spec.rb b/spec/workers/cluster_wait_for_ingress_ip_address_worker_spec.rb new file mode 100644 index 00000000000..9f8bf35f604 --- /dev/null +++ b/spec/workers/cluster_wait_for_ingress_ip_address_worker_spec.rb @@ -0,0 +1,20 @@ +require 'spec_helper' + +describe ClusterWaitForIngressIpAddressWorker do + describe '#perform' do + let(:service) { instance_double(Clusters::Applications::CheckIngressIpAddressService) } + let(:application) { instance_double(Clusters::Applications::Ingress) } + let(:worker) { described_class.new } + + it 'finds the application and calls CheckIngressIpAddressService#execute' do + expect(worker).to receive(:find_application).with('ingress', 117).and_yield(application) + expect(Clusters::Applications::CheckIngressIpAddressService) + .to receive(:new) + .with(application) + .and_return(service) + expect(service).to receive(:execute).with(2) + + worker.perform('ingress', 117, 2) + end + end +end |