summaryrefslogtreecommitdiff
path: root/spec/support/platform_helpers.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-03-27 14:36:15 -0700
committerTim Smith <tsmith84@gmail.com>2020-03-27 14:36:15 -0700
commitb03fd1d8fca7df4149ee25bd17e5fdaf9fc4fb9c (patch)
treeea25d9feb83cc2314604522b8ed283f890dc0f59 /spec/support/platform_helpers.rb
parent5fd95b07d03105b98fe860bc772f7a58fd0a9927 (diff)
downloadchef-net-tools.tar.gz
Skip the ifconfig functional tests if we don't have ifconfignet-tools
I'm looking at you Ubuntu 20.04 Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec/support/platform_helpers.rb')
-rw-r--r--spec/support/platform_helpers.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/support/platform_helpers.rb b/spec/support/platform_helpers.rb
index f9d8955f1e..e92da37043 100644
--- a/spec/support/platform_helpers.rb
+++ b/spec/support/platform_helpers.rb
@@ -270,6 +270,10 @@ rescue SocketError
false
end
+def ifconfig?
+ which("ifconfig")
+end
+
def choco_installed?
result = ShellHelpers.powershell_out("choco --version")
result.stderr.empty? ? true : false