diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-16 18:10:52 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-16 18:10:52 +0300 |
commit | 0552020767452da44de2bf5424096f2cb2ea6bf5 (patch) | |
tree | 9579d9f0ad3c730c33883130ec23420e80d1c5dc /spec/tooling/lib | |
parent | e3748b81ca29b24197276767e245158d8f84fda3 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/tooling/lib')
-rw-r--r-- | spec/tooling/lib/tooling/helm3_client_spec.rb | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/spec/tooling/lib/tooling/helm3_client_spec.rb b/spec/tooling/lib/tooling/helm3_client_spec.rb index 41c51ec5754..52d1b5a1567 100644 --- a/spec/tooling/lib/tooling/helm3_client_spec.rb +++ b/spec/tooling/lib/tooling/helm3_client_spec.rb @@ -35,7 +35,7 @@ RSpec.describe Tooling::Helm3Client do describe '#releases' do it 'raises an error if the Helm command fails' do expect(Gitlab::Popen).to receive(:popen_with_detail) - .with([%(helm list --namespace "#{namespace}" --max 256 --offset 0 --output json)]) + .with([%(helm list --max 256 --offset 0 --output json)]) .and_return(Gitlab::Popen::Result.new([], '', '', double(success?: false))) expect { subject.releases.to_a }.to raise_error(described_class::CommandFailedError) @@ -43,7 +43,7 @@ RSpec.describe Tooling::Helm3Client do it 'calls helm list with default arguments' do expect(Gitlab::Popen).to receive(:popen_with_detail) - .with([%(helm list --namespace "#{namespace}" --max 256 --offset 0 --output json)]) + .with([%(helm list --max 256 --offset 0 --output json)]) .and_return(Gitlab::Popen::Result.new([], '', '', double(success?: true))) subject.releases.to_a @@ -51,7 +51,7 @@ RSpec.describe Tooling::Helm3Client do it 'calls helm list with extra arguments' do expect(Gitlab::Popen).to receive(:popen_with_detail) - .with([%(helm list --namespace "#{namespace}" --max 256 --offset 0 --output json --deployed)]) + .with([%(helm list --max 256 --offset 0 --output json --deployed)]) .and_return(Gitlab::Popen::Result.new([], '', '', double(success?: true))) subject.releases(args: ['--deployed']).to_a @@ -59,7 +59,7 @@ RSpec.describe Tooling::Helm3Client do it 'returns a list of Release objects' do expect(Gitlab::Popen).to receive(:popen_with_detail) - .with([%(helm list --namespace "#{namespace}" --max 256 --offset 0 --output json --deployed)]) + .with([%(helm list --max 256 --offset 0 --output json --deployed)]) .and_return(Gitlab::Popen::Result.new([], raw_helm_list_page2, '', double(success?: true))) expect(Gitlab::Popen).to receive(:popen_with_detail).ordered .and_return(Gitlab::Popen::Result.new([], raw_helm_list_empty, '', double(success?: true))) @@ -80,13 +80,13 @@ RSpec.describe Tooling::Helm3Client do it 'automatically paginates releases' do expect(Gitlab::Popen).to receive(:popen_with_detail).ordered - .with([%(helm list --namespace "#{namespace}" --max 256 --offset 0 --output json)]) + .with([%(helm list --max 256 --offset 0 --output json)]) .and_return(Gitlab::Popen::Result.new([], raw_helm_list_page1, '', double(success?: true))) expect(Gitlab::Popen).to receive(:popen_with_detail).ordered - .with([%(helm list --namespace "#{namespace}" --max 256 --offset 256 --output json)]) + .with([%(helm list --max 256 --offset 256 --output json)]) .and_return(Gitlab::Popen::Result.new([], raw_helm_list_page2, '', double(success?: true))) expect(Gitlab::Popen).to receive(:popen_with_detail).ordered - .with([%(helm list --namespace "#{namespace}" --max 256 --offset 512 --output json)]) + .with([%(helm list --max 256 --offset 512 --output json)]) .and_return(Gitlab::Popen::Result.new([], raw_helm_list_empty, '', double(success?: true))) releases = subject.releases.to_a @@ -98,7 +98,7 @@ RSpec.describe Tooling::Helm3Client do describe '#delete' do it 'raises an error if the Helm command fails' do expect(Gitlab::Popen).to receive(:popen_with_detail) - .with([%(helm uninstall --namespace "#{namespace}" #{release_name})]) + .with([%(helm uninstall #{release_name})]) .and_return(Gitlab::Popen::Result.new([], '', '', double(success?: false))) expect { subject.delete(release_name: release_name) }.to raise_error(described_class::CommandFailedError) @@ -106,7 +106,7 @@ RSpec.describe Tooling::Helm3Client do it 'calls helm uninstall with default arguments' do expect(Gitlab::Popen).to receive(:popen_with_detail) - .with([%(helm uninstall --namespace "#{namespace}" #{release_name})]) + .with([%(helm uninstall #{release_name})]) .and_return(Gitlab::Popen::Result.new([], '', '', double(success?: true))) expect(subject.delete(release_name: release_name)).to eq('') @@ -117,16 +117,16 @@ RSpec.describe Tooling::Helm3Client do it 'raises an error if the Helm command fails' do expect(Gitlab::Popen).to receive(:popen_with_detail) - .with([%(helm uninstall --namespace "#{namespace}" #{release_name.join(' ')})]) - .and_return(Gitlab::Popen::Result.new([], '', '', double(success?: false))) + .with([%(helm uninstall #{release_name.join(' ')})]) + .and_return(Gitlab::Popen::Result.new([], '', '', double(success?: false))) expect { subject.delete(release_name: release_name) }.to raise_error(described_class::CommandFailedError) end it 'calls helm uninstall with multiple release names' do expect(Gitlab::Popen).to receive(:popen_with_detail) - .with([%(helm uninstall --namespace "#{namespace}" #{release_name.join(' ')})]) - .and_return(Gitlab::Popen::Result.new([], '', '', double(success?: true))) + .with([%(helm uninstall #{release_name.join(' ')})]) + .and_return(Gitlab::Popen::Result.new([], '', '', double(success?: true))) expect(subject.delete(release_name: release_name)).to eq('') end |