summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authordheerajd-msys <dheeraj.dubey@msystechnologies.com>2018-09-04 15:25:29 +0530
committerdheerajd-msys <dheeraj.dubey@msystechnologies.com>2018-09-25 11:36:10 +0530
commit15544c17fe9ccea0408ddf4d652b1678ebcdd592 (patch)
tree244f2c9abd03af1569bd3498618f66eb56738972 /spec
parentbf03eadf0ed4533932d026a1aaa2cced7b77d743 (diff)
downloadchef-15544c17fe9ccea0408ddf4d652b1678ebcdd592.tar.gz
add suse rspec testing
Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
Diffstat (limited to 'spec')
-rw-r--r--spec/functional/resource/zypper_package_spec.rb6
-rw-r--r--spec/spec_helper.rb1
2 files changed, 3 insertions, 4 deletions
diff --git a/spec/functional/resource/zypper_package_spec.rb b/spec/functional/resource/zypper_package_spec.rb
index 16fc4d205c..c95c3575ca 100644
--- a/spec/functional/resource/zypper_package_spec.rb
+++ b/spec/functional/resource/zypper_package_spec.rb
@@ -20,9 +20,7 @@ require "spec_helper"
require "functional/resource/base"
require "chef/mixin/shell_out"
-# run this test only for following platforms.
-exclude_test = !(%w{suse}.include?(ohai[:platform_family]) && !File.exist?("/usr/bin/zypper"))
-describe Chef::Resource::ZypperPackage, :requires_root, external: exclude_test do
+describe Chef::Resource::ZypperPackage, :requires_root, :suse_only do
include Chef::Mixin::ShellOut
# NOTE: every single test here needs to explicitly call preinstall.
@@ -97,7 +95,7 @@ describe Chef::Resource::ZypperPackage, :requires_root, external: exclude_test d
end
end
- context "with versions or globs in the name" do
+ context "with versions" do
it "works with a version" do
zypper_package.package_name("chef_rpm")
zypper_package.version("1.10")
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index e77f5dc8d6..e87308e9ed 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -171,6 +171,7 @@ RSpec.configure do |config|
config.filter_run_excluding unix_only: true unless unix?
config.filter_run_excluding linux_only: true unless linux?
config.filter_run_excluding aix_only: true unless aix?
+ config.filter_run_excluding suse_only: true unless suse?
config.filter_run_excluding debian_family_only: true unless debian_family?
config.filter_run_excluding supports_cloexec: true unless supports_cloexec?
config.filter_run_excluding selinux_only: true unless selinux_enabled?