summaryrefslogtreecommitdiff
path: root/spec/unit/provider/package
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-02-18 18:39:11 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2016-02-18 18:39:11 -0800
commit6077b99f6ad1bc9a082f575f3818e69f05d8c8dc (patch)
treeae132bad653614ae549e6301a01f991f8cf5cb5b /spec/unit/provider/package
parent8f9a0dbd88de3014161bebfef7a02821e0010a37 (diff)
downloadchef-6077b99f6ad1bc9a082f575f3818e69f05d8c8dc.tar.gz
deal with 0.37.2 renamed cops
252 Style/TrailingCommaInLiteral 84 Style/TrailingCommaInArguments 15 Style/SpaceAroundKeyword -- 351 Total We already dealt with SpaceAroundKeyword under its old name SpaceBeforeModifierKeyword, it looks like it got stricter about spaces after keywords. TrailingComma also got split, and it looks like the TrailingCommaInArguments behavior is new?
Diffstat (limited to 'spec/unit/provider/package')
-rw-r--r--spec/unit/provider/package/chocolatey_spec.rb4
-rw-r--r--spec/unit/provider/package/dpkg_spec.rb2
-rw-r--r--spec/unit/provider/package/easy_install_spec.rb12
-rw-r--r--spec/unit/provider/package/openbsd_spec.rb6
-rw-r--r--spec/unit/provider/package/yum_spec.rb44
-rw-r--r--spec/unit/provider/package/zypper_spec.rb48
6 files changed, 58 insertions, 58 deletions
diff --git a/spec/unit/provider/package/chocolatey_spec.rb b/spec/unit/provider/package/chocolatey_spec.rb
index a347aa7ebd..37b3ef8ccb 100644
--- a/spec/unit/provider/package/chocolatey_spec.rb
+++ b/spec/unit/provider/package/chocolatey_spec.rb
@@ -132,7 +132,7 @@ munin-node|1.6.1.20130823
it "should load and downcase names in the installed_packages hash" do
provider.load_current_resource
expect(provider.send(:installed_packages)).to eql(
- { "chocolatey" => "0.9.9.11", "conemu" => "15.10.25.0" }
+ { "chocolatey" => "0.9.9.11", "conemu" => "15.10.25.0" },
)
end
@@ -140,7 +140,7 @@ munin-node|1.6.1.20130823
allow_remote_list(["git"])
provider.load_current_resource
expect(provider.send(:available_packages)).to eql(
- { "chocolatey" => "0.9.9.11", "conemu" => "15.10.25.1", "git" => "2.6.2", "munin-node" => "1.6.1.20130823" }
+ { "chocolatey" => "0.9.9.11", "conemu" => "15.10.25.1", "git" => "2.6.2", "munin-node" => "1.6.1.20130823" },
)
end
diff --git a/spec/unit/provider/package/dpkg_spec.rb b/spec/unit/provider/package/dpkg_spec.rb
index 613f7a326e..0d651b238a 100644
--- a/spec/unit/provider/package/dpkg_spec.rb
+++ b/spec/unit/provider/package/dpkg_spec.rb
@@ -199,7 +199,7 @@ Section: ruby
it "and we should raise if we get any other exit codes from dpkg -s" do
dpkg_s_status = double(
- exitstatus: 3, stderr: "i am very, very angry with you. i'm very, very cross. go to your room.", stdout: ""
+ exitstatus: 3, stderr: "i am very, very angry with you. i'm very, very cross. go to your room.", stdout: "",
)
expect(provider).to receive(:shell_out!).with("dpkg -s #{package}", returns: [0, 1], timeout: 900).and_raise(Mixlib::ShellOut::ShellCommandFailed)
expect { provider.load_current_resource }.to raise_error(Mixlib::ShellOut::ShellCommandFailed)
diff --git a/spec/unit/provider/package/easy_install_spec.rb b/spec/unit/provider/package/easy_install_spec.rb
index 8ce485648b..681365b98b 100644
--- a/spec/unit/provider/package/easy_install_spec.rb
+++ b/spec/unit/provider/package/easy_install_spec.rb
@@ -62,14 +62,14 @@ describe Chef::Provider::Package::EasyInstall do
describe "actions_on_package" do
it "should run easy_install with the package name and version" do
expect(@provider).to receive(:run_command).with({
- :command => "easy_install \"boto==1.8d\""
+ :command => "easy_install \"boto==1.8d\"",
},)
@provider.install_package("boto", "1.8d")
end
it "should run easy_install with the package name and version and specified options" do
expect(@provider).to receive(:run_command).with({
- :command => "easy_install --always-unzip \"boto==1.8d\""
+ :command => "easy_install --always-unzip \"boto==1.8d\"",
},)
allow(@new_resource).to receive(:options).and_return("--always-unzip")
@provider.install_package("boto", "1.8d")
@@ -77,21 +77,21 @@ describe Chef::Provider::Package::EasyInstall do
it "should run easy_install with the package name and version" do
expect(@provider).to receive(:run_command).with({
- :command => "easy_install \"boto==1.8d\""
+ :command => "easy_install \"boto==1.8d\"",
},)
@provider.upgrade_package("boto", "1.8d")
end
it "should run easy_install -m with the package name and version" do
expect(@provider).to receive(:run_command).with({
- :command => "easy_install -m boto"
+ :command => "easy_install -m boto",
},)
@provider.remove_package("boto", "1.8d")
end
it "should run easy_install -m with the package name and version and specified options" do
expect(@provider).to receive(:run_command).with({
- :command => "easy_install -x -m boto"
+ :command => "easy_install -x -m boto",
},)
allow(@new_resource).to receive(:options).and_return("-x")
@provider.remove_package("boto", "1.8d")
@@ -99,7 +99,7 @@ describe Chef::Provider::Package::EasyInstall do
it "should run easy_install -m with the package name and version" do
expect(@provider).to receive(:run_command).with({
- :command => "easy_install -m boto"
+ :command => "easy_install -m boto",
},)
@provider.purge_package("boto", "1.8d")
end
diff --git a/spec/unit/provider/package/openbsd_spec.rb b/spec/unit/provider/package/openbsd_spec.rb
index 3e1c1c90b6..48802f48ce 100644
--- a/spec/unit/provider/package/openbsd_spec.rb
+++ b/spec/unit/provider/package/openbsd_spec.rb
@@ -56,7 +56,7 @@ describe Chef::Provider::Package::Openbsd do
instance_double("shellout", :stdout => "#{name}-#{version}\n"))
expect(provider).to receive(:shell_out!).with(
"pkg_add -r #{name}-#{version}",
- { :env => { "PKG_PATH" => "http://ftp.OpenBSD.org/pub/OpenBSD/5.5/packages/amd64/" }, timeout: 900 }
+ { :env => { "PKG_PATH" => "http://ftp.OpenBSD.org/pub/OpenBSD/5.5/packages/amd64/" }, timeout: 900 },
) { OpenStruct.new :status => true }
provider.run_action(:install)
end
@@ -88,7 +88,7 @@ describe Chef::Provider::Package::Openbsd do
instance_double("shellout", :stdout => "#{name}-#{version}-#{flavor}\n"))
expect(provider).to receive(:shell_out!).with(
"pkg_add -r #{name}-#{version}-#{flavor}",
- { env: { "PKG_PATH" => "http://ftp.OpenBSD.org/pub/OpenBSD/5.5/packages/amd64/" }, timeout: 900 }
+ { env: { "PKG_PATH" => "http://ftp.OpenBSD.org/pub/OpenBSD/5.5/packages/amd64/" }, timeout: 900 },
) { OpenStruct.new :status => true }
provider.run_action(:install)
end
@@ -104,7 +104,7 @@ describe Chef::Provider::Package::Openbsd do
new_resource.version("#{version}-#{flavor_b}")
expect(provider).to receive(:shell_out!).with(
"pkg_add -r #{name}-#{version}-#{flavor_b}",
- { env: { "PKG_PATH" => "http://ftp.OpenBSD.org/pub/OpenBSD/5.5/packages/amd64/" }, timeout: 900 }
+ { env: { "PKG_PATH" => "http://ftp.OpenBSD.org/pub/OpenBSD/5.5/packages/amd64/" }, timeout: 900 },
) { OpenStruct.new :status => true }
provider.run_action(:install)
end
diff --git a/spec/unit/provider/package/yum_spec.rb b/spec/unit/provider/package/yum_spec.rb
index 2b3048bc19..bb071a6559 100644
--- a/spec/unit/provider/package/yum_spec.rb
+++ b/spec/unit/provider/package/yum_spec.rb
@@ -133,7 +133,7 @@ describe Chef::Provider::Package::Yum do
it "should set the arch if no existing package_name is found and new_package_name+new_arch is available" do
@new_resource = Chef::Resource::YumPackage.new("testing.noarch")
@yum_cache = double(
- "Chef::Provider::Yum::YumCache"
+ "Chef::Provider::Yum::YumCache",
)
allow(@yum_cache).to receive(:installed_version) do |package_name, arch|
# nothing installed for package_name/new_package_name
@@ -188,7 +188,7 @@ describe Chef::Provider::Package::Yum do
it "should not set the arch when an existing package_name is found" do
@new_resource = Chef::Resource::YumPackage.new("testing.beta3")
@yum_cache = double(
- "Chef::Provider::Yum::YumCache"
+ "Chef::Provider::Yum::YumCache",
)
allow(@yum_cache).to receive(:installed_version) do |package_name, arch|
# installed for package_name
@@ -224,7 +224,7 @@ describe Chef::Provider::Package::Yum do
it "should not set the arch when no existing package_name or new_package_name+new_arch is found" do
@new_resource = Chef::Resource::YumPackage.new("testing.beta3")
@yum_cache = double(
- "Chef::Provider::Yum::YumCache"
+ "Chef::Provider::Yum::YumCache",
)
allow(@yum_cache).to receive(:installed_version) do |package_name, arch|
# nothing installed for package_name/new_package_name
@@ -256,7 +256,7 @@ describe Chef::Provider::Package::Yum do
@new_resource = Chef::Resource::YumPackage.new("testing.i386")
@new_resource.arch("x86_64")
@yum_cache = double(
- "Chef::Provider::Yum::YumCache"
+ "Chef::Provider::Yum::YumCache",
)
allow(@yum_cache).to receive(:installed_version) do |package_name, arch|
# nothing installed for package_name/new_package_name
@@ -524,7 +524,7 @@ describe Chef::Provider::Package::Yum do
@provider.load_current_resource
allow(Chef::Provider::Package::Yum::RPMUtils).to receive(:rpmvercmp).and_return(-1)
expect(@provider).to receive(:yum_command).with(
- "-d0 -e0 -y install cups-1.2.4-11.19.el5"
+ "-d0 -e0 -y install cups-1.2.4-11.19.el5",
)
@provider.install_package("cups", "1.2.4-11.19.el5")
end
@@ -532,7 +532,7 @@ describe Chef::Provider::Package::Yum do
it "should run yum localinstall if given a path to an rpm" do
allow(@new_resource).to receive(:source).and_return("/tmp/emacs-21.4-20.el5.i386.rpm")
expect(@provider).to receive(:yum_command).with(
- "-d0 -e0 -y localinstall /tmp/emacs-21.4-20.el5.i386.rpm"
+ "-d0 -e0 -y localinstall /tmp/emacs-21.4-20.el5.i386.rpm",
)
@provider.install_package("emacs", "21.4-20.el5")
end
@@ -543,7 +543,7 @@ describe Chef::Provider::Package::Yum do
@provider = Chef::Provider::Package::Yum.new(@new_resource, @run_context)
expect(@new_resource.source).to eq("/tmp/emacs-21.4-20.el5.i386.rpm")
expect(@provider).to receive(:yum_command).with(
- "-d0 -e0 -y localinstall /tmp/emacs-21.4-20.el5.i386.rpm"
+ "-d0 -e0 -y localinstall /tmp/emacs-21.4-20.el5.i386.rpm",
)
@provider.install_package("/tmp/emacs-21.4-20.el5.i386.rpm", "21.4-20.el5")
end
@@ -553,7 +553,7 @@ describe Chef::Provider::Package::Yum do
allow(@new_resource).to receive(:arch).and_return("i386")
allow(Chef::Provider::Package::Yum::RPMUtils).to receive(:rpmvercmp).and_return(-1)
expect(@provider).to receive(:yum_command).with(
- "-d0 -e0 -y install cups-1.2.4-11.19.el5.i386"
+ "-d0 -e0 -y install cups-1.2.4-11.19.el5.i386",
)
@provider.install_package("cups", "1.2.4-11.19.el5")
end
@@ -564,7 +564,7 @@ describe Chef::Provider::Package::Yum do
allow(@new_resource).to receive(:options).and_return("--disablerepo epmd")
allow(Chef::Provider::Package::Yum::RPMUtils).to receive(:rpmvercmp).and_return(-1)
expect(@provider).to receive(:yum_command).with(
- "-d0 -e0 -y --disablerepo epmd install cups-11"
+ "-d0 -e0 -y --disablerepo epmd install cups-11",
)
@provider.install_package(@new_resource.name, @provider.candidate_version)
end
@@ -624,7 +624,7 @@ describe Chef::Provider::Package::Yum do
@provider = Chef::Provider::Package::Yum.new(@new_resource, @run_context)
@provider.load_current_resource
expect(@provider).to receive(:yum_command).with(
- "-d0 -e0 -y install cups-1.2.4-11.15.el5"
+ "-d0 -e0 -y install cups-1.2.4-11.15.el5",
)
@provider.install_package("cups", "1.2.4-11.15.el5")
end
@@ -648,7 +648,7 @@ describe Chef::Provider::Package::Yum do
@provider = Chef::Provider::Package::Yum.new(@new_resource, @run_context)
@provider.load_current_resource
expect(@provider).to receive(:yum_command).with(
- "-d0 -e0 -y downgrade cups-1.2.4-11.15.el5"
+ "-d0 -e0 -y downgrade cups-1.2.4-11.15.el5",
)
@provider.install_package("cups", "1.2.4-11.15.el5")
end
@@ -658,7 +658,7 @@ describe Chef::Provider::Package::Yum do
@provider.load_current_resource
allow(Chef::Provider::Package::Yum::RPMUtils).to receive(:rpmvercmp).and_return(-1)
expect(@provider).to receive(:yum_command).with(
- "-d0 -e0 -y install cups-1.2.4-11.15.el5"
+ "-d0 -e0 -y install cups-1.2.4-11.15.el5",
)
expect(@yum_cache).to receive(:reload).once
@provider.install_package("cups", "1.2.4-11.15.el5")
@@ -669,7 +669,7 @@ describe Chef::Provider::Package::Yum do
@provider.load_current_resource
allow(Chef::Provider::Package::Yum::RPMUtils).to receive(:rpmvercmp).and_return(-1)
expect(@provider).to receive(:yum_command).with(
- "-d0 -e0 -y install cups-1.2.4-11.15.el5"
+ "-d0 -e0 -y install cups-1.2.4-11.15.el5",
)
expect(@yum_cache).not_to receive(:reload)
@provider.install_package("cups", "1.2.4-11.15.el5")
@@ -682,7 +682,7 @@ describe Chef::Provider::Package::Yum do
allow(@provider).to receive(:candidate_version).and_return("11")
allow(Chef::Provider::Package::Yum::RPMUtils).to receive(:rpmvercmp).and_return(-1)
expect(@provider).to receive(:yum_command).with(
- "-d0 -e0 -y install cups-11"
+ "-d0 -e0 -y install cups-11",
)
@provider.upgrade_package(@new_resource.name, @provider.candidate_version)
end
@@ -693,7 +693,7 @@ describe Chef::Provider::Package::Yum do
allow(@provider).to receive(:candidate_version).and_return("11")
allow(Chef::Provider::Package::Yum::RPMUtils).to receive(:rpmvercmp).and_return(-1)
expect(@provider).to receive(:yum_command).with(
- "-d0 -e0 -y install cups-11"
+ "-d0 -e0 -y install cups-11",
)
@provider.upgrade_package(@new_resource.name, @provider.candidate_version)
end
@@ -761,7 +761,7 @@ describe Chef::Provider::Package::Yum do
describe "when removing a package" do
it "should run yum remove with the package name" do
expect(@provider).to receive(:yum_command).with(
- "-d0 -e0 -y remove emacs-1.0"
+ "-d0 -e0 -y remove emacs-1.0",
)
@provider.remove_package("emacs", "1.0")
end
@@ -769,7 +769,7 @@ describe Chef::Provider::Package::Yum do
it "should run yum remove with the package name and arch" do
allow(@new_resource).to receive(:arch).and_return("x86_64")
expect(@provider).to receive(:yum_command).with(
- "-d0 -e0 -y remove emacs-1.0.x86_64"
+ "-d0 -e0 -y remove emacs-1.0.x86_64",
)
@provider.remove_package("emacs", "1.0")
end
@@ -778,7 +778,7 @@ describe Chef::Provider::Package::Yum do
describe "when purging a package" do
it "should run yum remove with the package name" do
expect(@provider).to receive(:yum_command).with(
- "-d0 -e0 -y remove emacs-1.0"
+ "-d0 -e0 -y remove emacs-1.0",
)
@provider.purge_package("emacs", "1.0")
end
@@ -2211,7 +2211,7 @@ describe "Chef::Provider::Package::Yum - Multi" do
allow(@yum_cache).to receive(:installed_version).with("cups", nil).and_return("1.2.4-11.18.el5")
allow(@yum_cache).to receive(:installed_version).with("vim", nil).and_return("0.9")
expect(@provider).to receive(:yum_command).with(
- "-d0 -e0 -y install cups-1.2.4-11.19.el5 vim-1.0"
+ "-d0 -e0 -y install cups-1.2.4-11.19.el5 vim-1.0",
)
@provider.install_package(%w{cups vim}, ["1.2.4-11.19.el5", "1.0"])
end
@@ -2221,7 +2221,7 @@ describe "Chef::Provider::Package::Yum - Multi" do
allow(@new_resource).to receive(:arch).and_return("i386")
allow(Chef::Provider::Package::Yum::RPMUtils).to receive(:rpmvercmp).and_return(-1)
expect(@provider).to receive(:yum_command).with(
- "-d0 -e0 -y install cups-1.2.4-11.19.el5.i386 vim-1.0.i386"
+ "-d0 -e0 -y install cups-1.2.4-11.19.el5.i386 vim-1.0.i386",
)
@provider.install_package(%w{cups vim}, ["1.2.4-11.19.el5", "1.0"])
end
@@ -2232,7 +2232,7 @@ describe "Chef::Provider::Package::Yum - Multi" do
allow(@yum_cache).to receive(:installed_version).with("cups", nil).and_return("1.2.4-11.18.el5")
allow(@yum_cache).to receive(:installed_version).with("vim", nil).and_return("0.9")
expect(@provider).to receive(:yum_command).with(
- "-d0 -e0 -y --disablerepo epmd install cups-1.2.4-11.19.el5 vim-1.0"
+ "-d0 -e0 -y --disablerepo epmd install cups-1.2.4-11.19.el5 vim-1.0",
)
allow(@new_resource).to receive(:options).and_return("--disablerepo epmd")
@provider.install_package(%w{cups vim}, ["1.2.4-11.19.el5", "1.0"])
@@ -2258,7 +2258,7 @@ describe "Chef::Provider::Package::Yum - Multi" do
@provider.load_current_resource
expect(@provider).to receive(:yum_command).with(
- "-d0 -e0 -y install cups-1.2.4-11.19.el5.x86_64 vim-1.0"
+ "-d0 -e0 -y install cups-1.2.4-11.19.el5.x86_64 vim-1.0",
)
@provider.install_package(%w{cups vim}, ["1.2.4-11.19.el5", "1.0"])
end
diff --git a/spec/unit/provider/package/zypper_spec.rb b/spec/unit/provider/package/zypper_spec.rb
index df0a1da9a2..4def0f5558 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