diff options
author | Chris Baumbauer <cab@cabnetworks.net> | 2018-11-26 23:02:33 +0300 |
---|---|---|
committer | Chris Baumbauer <cab@cabnetworks.net> | 2018-11-26 23:46:00 +0300 |
commit | 2937be7b0c46ae97aa89572a9a349ed636198696 (patch) | |
tree | 49757cdd159b2385600d9a08ede07caf07a31313 /spec/services | |
parent | 95ebdf3053ef9aeba657ff9bf1a5a66b608cc6dc (diff) |
Expose external_ip to knative cluster application
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/clusters/applications/check_ingress_ip_address_service_spec.rb | 38 |
1 files changed, 2 insertions, 36 deletions
diff --git a/spec/services/clusters/applications/check_ingress_ip_address_service_spec.rb b/spec/services/clusters/applications/check_ingress_ip_address_service_spec.rb index eb0bdb61ee3..f3036fbcb0e 100644 --- a/spec/services/clusters/applications/check_ingress_ip_address_service_spec.rb +++ b/spec/services/clusters/applications/check_ingress_ip_address_service_spec.rb @@ -28,41 +28,7 @@ describe Clusters::Applications::CheckIngressIpAddressService do allow(application.cluster).to receive(:kubeclient).and_return(kubeclient) end - describe '#execute' do - context 'when the ingress ip address is available' do - it 'updates the external_ip for the app' do - subject + include_examples 'check ingress ip executions', :clusters_applications_ingress - expect(application.external_ip).to eq('111.222.111.222') - end - end - - context 'when the ingress ip address is not available' do - let(:ingress) { nil } - - it 'does not error' do - subject - end - end - - context 'when the exclusive lease cannot be obtained' do - it 'does not call kubeclient' do - stub_exclusive_lease_taken(lease_key, timeout: 15.seconds.to_i) - - subject - - expect(kubeclient).not_to have_received(:get_service) - end - end - - context 'when there is already an external_ip' do - let(:application) { create(:clusters_applications_ingress, :installed, external_ip: '001.111.002.111') } - - it 'does not call kubeclient' do - subject - - expect(kubeclient).not_to have_received(:get_service) - end - end - end + include_examples 'check ingress ip executions', :clusters_applications_knative end |