summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorManick Vel <mkumaravel@msystechnologies.com>2022-01-20 18:03:38 +0530
committerpratixha <pratiksha.prajapati@msystechnologies.com>2022-05-25 12:13:22 +0530
commit394e75398a84b5bf13b835bc46ed598384eb7bd0 (patch)
tree834a13832ee269bf5c2d4c516066d97682cfac2e /spec
parent2d2f03241fa9682ba7899c027ab10d3888cbcedd (diff)
downloadchef-394e75398a84b5bf13b835bc46ed598384eb7bd0.tar.gz
Addressed source_file_exist and uri_scheme related changes
Signed-off-by: Manick Vel <mkumaravel@msystechnologies.com>
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/provider/package/zypper_spec.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/unit/provider/package/zypper_spec.rb b/spec/unit/provider/package/zypper_spec.rb
index 024bb1b26d..bc28e42f1d 100644
--- a/spec/unit/provider/package/zypper_spec.rb
+++ b/spec/unit/provider/package/zypper_spec.rb
@@ -32,7 +32,7 @@ describe Chef::Provider::Package::Zypper do
let(:status) { double(stdout: "\n", exitstatus: 0) }
- let(:source) { "/tmp/wget_1.11.4-1ubuntu1_amd64.deb" }
+ let(:source) { "/tmp/wget_1.11.4-1ubuntu1_amd64.rpm" }
before(:each) do
allow(Chef::Resource::Package).to receive(:new).and_return(current_resource)
@@ -167,10 +167,10 @@ describe Chef::Provider::Package::Zypper do
end
it "should run zypper install with source option" do
- new_resource.source "/tmp/wget_1.11.4-1ubuntu1_amd64.deb"
- allow(::File).to receive(:exist?).with("/tmp/wget_1.11.4-1ubuntu1_amd64.deb").and_return(true)
+ new_resource.source "/tmp/wget_1.11.4-1ubuntu1_amd64.rpm"
+ allow(::File).to receive(:exist?).with("/tmp/wget_1.11.4-1ubuntu1_amd64.rpm").and_return(true)
shell_out_expectation!(
- "zypper", "--non-interactive", "install", "--auto-agree-with-licenses", "--oldpackage", "/tmp/wget_1.11.4-1ubuntu1_amd64.deb"
+ "zypper", "--non-interactive", "install", "--auto-agree-with-licenses", "--oldpackage", "/tmp/wget_1.11.4-1ubuntu1_amd64.rpm"
)
provider.install_package(["emacs"], ["1.0"])
end
@@ -213,10 +213,10 @@ describe Chef::Provider::Package::Zypper do
end
it "should run zypper upgrade with source option" do
- new_resource.source "/tmp/wget_1.11.4-1ubuntu1_amd64.deb"
- allow(::File).to receive(:exist?).with("/tmp/wget_1.11.4-1ubuntu1_amd64.deb").and_return(true)
+ new_resource.source "/tmp/wget_1.11.4-1ubuntu1_amd64.rpm"
+ allow(::File).to receive(:exist?).with("/tmp/wget_1.11.4-1ubuntu1_amd64.rpm").and_return(true)
shell_out_expectation!(
- "zypper", "--non-interactive", "install", "--auto-agree-with-licenses", "--oldpackage", "/tmp/wget_1.11.4-1ubuntu1_amd64.deb"
+ "zypper", "--non-interactive", "install", "--auto-agree-with-licenses", "--oldpackage", "/tmp/wget_1.11.4-1ubuntu1_amd64.rpm"
)
provider.upgrade_package(["emacs"], ["1.0"])
end