summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2019-12-02 10:41:35 -0800
committerTim Smith <tsmith84@gmail.com>2019-12-02 10:41:35 -0800
commit7322fac966674db32219f69e2580d46e4f5ae1e9 (patch)
tree5eae8de33246ac663c8bea1105aa344e44f82f31
parent23df848b683b1197a2a20ea01f02eaf2f7818940 (diff)
downloadchef-7322fac966674db32219f69e2580d46e4f5ae1e9.tar.gz
Fix interface detection in the ifconfig test
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--spec/functional/resource/ifconfig_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/functional/resource/ifconfig_spec.rb b/spec/functional/resource/ifconfig_spec.rb
index a88384e47d..0a82e59137 100644
--- a/spec/functional/resource/ifconfig_spec.rb
+++ b/spec/functional/resource/ifconfig_spec.rb
@@ -51,7 +51,7 @@ describe Chef::Resource::Ifconfig, :requires_root, external: include_flag do
end
def fetch_first_interface_name
- shell_out("ip link list |grep UP|grep -vi loop|head -1|cut -d':' -f 2").stdout.strip
+ shell_out("ip link list |grep UP|grep -vi loop|head -1|cut -d':' -f 2 |cut -d'@' -f 1").stdout.strip
end
# **Caution: any updates to core interfaces can be risky.