diff options
Diffstat (limited to 'spec/unit/provider/package/zypper_spec.rb')
-rw-r--r-- | spec/unit/provider/package/zypper_spec.rb | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/spec/unit/provider/package/zypper_spec.rb b/spec/unit/provider/package/zypper_spec.rb index 4def0f5558..df0a1da9a2 100644 --- a/spec/unit/provider/package/zypper_spec.rb +++ b/spec/unit/provider/package/zypper_spec.rb @@ -61,7 +61,7 @@ describe Chef::Provider::Package::Zypper do it "should run zypper info with the package name" do shell_out_expectation!( - "zypper --non-interactive info #{new_resource.package_name}", + "zypper --non-interactive info #{new_resource.package_name}" ).and_return(status) provider.load_current_resource end @@ -97,23 +97,23 @@ describe Chef::Provider::Package::Zypper do it "should run zypper install with the package name and version" do allow(Chef::Config).to receive(:[]).with(:zypper_check_gpg).and_return(true) shell_out_expectation!( - "zypper --non-interactive install --auto-agree-with-licenses emacs=1.0", + "zypper --non-interactive install --auto-agree-with-licenses emacs=1.0" ) provider.install_package(["emacs"], ["1.0"]) end it "should run zypper install without gpg checks" do allow(Chef::Config).to receive(:[]).with(:zypper_check_gpg).and_return(false) shell_out_expectation!( - "zypper --non-interactive --no-gpg-checks install " + "--auto-agree-with-licenses emacs=1.0", + "zypper --non-interactive --no-gpg-checks install " + "--auto-agree-with-licenses emacs=1.0" ) provider.install_package(["emacs"], ["1.0"]) end it "should warn about gpg checks on zypper install" do expect(Chef::Log).to receive(:warn).with( - /All packages will be installed without gpg signature checks/, + /All packages will be installed without gpg signature checks/ ) shell_out_expectation!( - "zypper --non-interactive --no-gpg-checks install " + "--auto-agree-with-licenses emacs=1.0", + "zypper --non-interactive --no-gpg-checks install " + "--auto-agree-with-licenses emacs=1.0" ) provider.install_package(["emacs"], ["1.0"]) end @@ -123,29 +123,29 @@ describe Chef::Provider::Package::Zypper do it "should run zypper update with the package name and version" do allow(Chef::Config).to receive(:[]).with(:zypper_check_gpg).and_return(true) shell_out_expectation!( - "zypper --non-interactive install --auto-agree-with-licenses emacs=1.0", + "zypper --non-interactive install --auto-agree-with-licenses emacs=1.0" ) provider.upgrade_package(["emacs"], ["1.0"]) end it "should run zypper update without gpg checks" do allow(Chef::Config).to receive(:[]).with(:zypper_check_gpg).and_return(false) shell_out_expectation!( - "zypper --non-interactive --no-gpg-checks install " + "--auto-agree-with-licenses emacs=1.0", + "zypper --non-interactive --no-gpg-checks install " + "--auto-agree-with-licenses emacs=1.0" ) provider.upgrade_package(["emacs"], ["1.0"]) end it "should warn about gpg checks on zypper upgrade" do expect(Chef::Log).to receive(:warn).with( - /All packages will be installed without gpg signature checks/, + /All packages will be installed without gpg signature checks/ ) shell_out_expectation!( - "zypper --non-interactive --no-gpg-checks install " + "--auto-agree-with-licenses emacs=1.0", + "zypper --non-interactive --no-gpg-checks install " + "--auto-agree-with-licenses emacs=1.0" ) provider.upgrade_package(["emacs"], ["1.0"]) end it "should run zypper upgrade without gpg checks" do shell_out_expectation!( - "zypper --non-interactive --no-gpg-checks install " + "--auto-agree-with-licenses emacs=1.0", + "zypper --non-interactive --no-gpg-checks install " + "--auto-agree-with-licenses emacs=1.0" ) provider.upgrade_package(["emacs"], ["1.0"]) end @@ -157,7 +157,7 @@ describe Chef::Provider::Package::Zypper do it "should run zypper remove with the package name" do allow(Chef::Config).to receive(:[]).with(:zypper_check_gpg).and_return(true) shell_out_expectation!( - "zypper --non-interactive remove emacs", + "zypper --non-interactive remove emacs" ) provider.remove_package(["emacs"], [nil]) end @@ -167,23 +167,23 @@ describe Chef::Provider::Package::Zypper do it "should run zypper remove with the package name" do allow(Chef::Config).to receive(:[]).with(:zypper_check_gpg).and_return(true) shell_out_expectation!( - "zypper --non-interactive remove emacs=1.0", + "zypper --non-interactive remove emacs=1.0" ) provider.remove_package(["emacs"], ["1.0"]) end it "should run zypper remove without gpg checks" do allow(Chef::Config).to receive(:[]).with(:zypper_check_gpg).and_return(false) shell_out_expectation!( - "zypper --non-interactive --no-gpg-checks remove emacs=1.0", + "zypper --non-interactive --no-gpg-checks remove emacs=1.0" ) provider.remove_package(["emacs"], ["1.0"]) end it "should warn about gpg checks on zypper remove" do expect(Chef::Log).to receive(:warn).with( - /All packages will be installed without gpg signature checks/, + /All packages will be installed without gpg signature checks/ ) shell_out_expectation!( - "zypper --non-interactive --no-gpg-checks remove emacs=1.0", + "zypper --non-interactive --no-gpg-checks remove emacs=1.0" ) provider.remove_package(["emacs"], ["1.0"]) end @@ -193,23 +193,23 @@ describe Chef::Provider::Package::Zypper do describe "purge_package" do it "should run remove with the name and version and --clean-deps" do shell_out_expectation!( - "zypper --non-interactive --no-gpg-checks remove --clean-deps emacs=1.0", + "zypper --non-interactive --no-gpg-checks remove --clean-deps emacs=1.0" ) provider.purge_package(["emacs"], ["1.0"]) end it "should run zypper purge without gpg checks" do allow(Chef::Config).to receive(:[]).with(:zypper_check_gpg).and_return(false) shell_out_expectation!( - "zypper --non-interactive --no-gpg-checks remove --clean-deps emacs=1.0", + "zypper --non-interactive --no-gpg-checks remove --clean-deps emacs=1.0" ) provider.purge_package(["emacs"], ["1.0"]) end it "should warn about gpg checks on zypper purge" do expect(Chef::Log).to receive(:warn).with( - /All packages will be installed without gpg signature checks/, + /All packages will be installed without gpg signature checks/ ) shell_out_expectation!( - "zypper --non-interactive --no-gpg-checks remove --clean-deps emacs=1.0", + "zypper --non-interactive --no-gpg-checks remove --clean-deps emacs=1.0" ) provider.purge_package(["emacs"], ["1.0"]) end @@ -223,7 +223,7 @@ describe Chef::Provider::Package::Zypper do describe "install_package" do it "should run zypper install with the package name and version" do shell_out_expectation!( - "zypper --no-gpg-checks install --auto-agree-with-licenses -y emacs", + "zypper --no-gpg-checks install --auto-agree-with-licenses -y emacs" ) provider.install_package(["emacs"], ["1.0"]) end @@ -232,7 +232,7 @@ describe Chef::Provider::Package::Zypper do describe "upgrade_package" do it "should run zypper update with the package name and version" do shell_out_expectation!( - "zypper --no-gpg-checks install --auto-agree-with-licenses -y emacs", + "zypper --no-gpg-checks install --auto-agree-with-licenses -y emacs" ) provider.upgrade_package(["emacs"], ["1.0"]) end @@ -241,7 +241,7 @@ describe Chef::Provider::Package::Zypper do describe "remove_package" do it "should run zypper remove with the package name" do shell_out_expectation!( - "zypper --no-gpg-checks remove -y emacs", + "zypper --no-gpg-checks remove -y emacs" ) provider.remove_package(["emacs"], ["1.0"]) end @@ -252,7 +252,7 @@ describe Chef::Provider::Package::Zypper do it "should install an array of package names and versions" do allow(Chef::Config).to receive(:[]).with(:zypper_check_gpg).and_return(false) shell_out_expectation!( - "zypper --non-interactive --no-gpg-checks install " + "--auto-agree-with-licenses emacs=1.0 vim=2.0", + "zypper --non-interactive --no-gpg-checks install " + "--auto-agree-with-licenses emacs=1.0 vim=2.0" ) provider.install_package(%w{emacs vim}, ["1.0", "2.0"]) end @@ -260,7 +260,7 @@ describe Chef::Provider::Package::Zypper do it "should remove an array of package names and versions" do allow(Chef::Config).to receive(:[]).with(:zypper_check_gpg).and_return(false) shell_out_expectation!( - "zypper --non-interactive --no-gpg-checks remove emacs=1.0 vim=2.0", + "zypper --non-interactive --no-gpg-checks remove emacs=1.0 vim=2.0" ) provider.remove_package(%w{emacs vim}, ["1.0", "2.0"]) end |