summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorpratixha <pratiksha.prajapati@msystechnologies.com>2022-03-23 19:03:32 +0530
committerpratixha <pratiksha.prajapati@msystechnologies.com>2022-05-25 12:13:25 +0530
commit9e40fb06c3659a8f3c2d53b0fa476fcc6775f66b (patch)
treed83d8e122ded214bd56d089c8705a3c864372b7d /spec
parent7982938c5389572d4dbdc980c8e8fede54604066 (diff)
downloadchef-9e40fb06c3659a8f3c2d53b0fa476fcc6775f66b.tar.gz
Fixed functional and unit tests
Signed-off-by: pratixha <pratiksha.prajapati@msystechnologies.com>
Diffstat (limited to 'spec')
-rw-r--r--spec/functional/resource/zypper_package_spec.rb2
-rw-r--r--spec/unit/provider/package/zypper_spec.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/spec/functional/resource/zypper_package_spec.rb b/spec/functional/resource/zypper_package_spec.rb
index 422502a29d..87c5f0e5e3 100644
--- a/spec/functional/resource/zypper_package_spec.rb
+++ b/spec/functional/resource/zypper_package_spec.rb
@@ -75,7 +75,7 @@ describe Chef::Resource::ZypperPackage, :requires_root, :suse_only do
end
it "install package with source argument" do
- source("#{CHEF_SPEC_ASSETS}/zypprepo/chef_rpm-1.2-1.#{pkg_arch}.rpm")
+ zypper_package.source = "#{CHEF_SPEC_ASSETS}/zypprepo/chef_rpm-1.10-1.#{pkg_arch}.rpm"
zypper_package.run_action(:install)
expect(zypper_package.updated_by_last_action?).to be true
expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
diff --git a/spec/unit/provider/package/zypper_spec.rb b/spec/unit/provider/package/zypper_spec.rb
index bc28e42f1d..95810edcb4 100644
--- a/spec/unit/provider/package/zypper_spec.rb
+++ b/spec/unit/provider/package/zypper_spec.rb
@@ -172,7 +172,7 @@ describe Chef::Provider::Package::Zypper do
shell_out_expectation!(
"zypper", "--non-interactive", "install", "--auto-agree-with-licenses", "--oldpackage", "/tmp/wget_1.11.4-1ubuntu1_amd64.rpm"
)
- provider.install_package(["emacs"], ["1.0"])
+ provider.install_package(["wget"], ["1.11.4-1ubuntu1_amd64"])
end
end
@@ -218,7 +218,7 @@ describe Chef::Provider::Package::Zypper do
shell_out_expectation!(
"zypper", "--non-interactive", "install", "--auto-agree-with-licenses", "--oldpackage", "/tmp/wget_1.11.4-1ubuntu1_amd64.rpm"
)
- provider.upgrade_package(["emacs"], ["1.0"])
+ provider.install_package(["wget"], ["1.11.4-1ubuntu1_amd64"])
end
end