summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan McLellan <btm@loftninjas.org>2017-11-22 14:53:59 -0500
committerGitHub <noreply@github.com>2017-11-22 14:53:59 -0500
commitd724e330980c190175794c7454260db170686178 (patch)
tree3904a8824d99706fe66b193e92b3880f10661c31
parent6664a22bae21caea867ca1ee059adc62e66f0ff8 (diff)
parentcef9ea636ab110b24b5703cce1455db69706d6be (diff)
downloadchef-d724e330980c190175794c7454260db170686178.tar.gz
Merge pull request #6597 from chef/btm/appveyor-bundler
Don't try to uninstall bundler on appveyor
-rw-r--r--appveyor.yml3
-rw-r--r--lib/chef/provider/ifconfig.rb2
-rw-r--r--spec/unit/provider/ifconfig_spec.rb13
3 files changed, 11 insertions, 7 deletions
diff --git a/appveyor.yml b/appveyor.yml
index de947203c1..959c8e616c 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -28,10 +28,7 @@ install:
- echo %OMNIBUS_BUNDLER%
- ruby --version
- gem --version
- - bundler --version
- - gem uninstall bundler -a -x
- gem update --system %OMNIBUS_RUBYGEMS% || gem update --system %OMNIBUS_RUBYGEMS% || gem update --system %OMNIBUS_RUBYGEMS%
- - gem install bundler -v %OMNIBUS_BUNDLER% --quiet --no-ri --no-rdoc || gem install bundler -v %OMNIBUS_BUNDLER% --quiet --no-ri --no-rdoc || gem install bundler -v %OMNIBUS_BUNDLER% --quiet --no-ri --no-rdoc
- gem --version
- bundler --version
- SET BUNDLE_WITHOUT=server:docgen:maintenance:pry:travis:integration:ci
diff --git a/lib/chef/provider/ifconfig.rb b/lib/chef/provider/ifconfig.rb
index cdca0db10b..5008d7877a 100644
--- a/lib/chef/provider/ifconfig.rb
+++ b/lib/chef/provider/ifconfig.rb
@@ -78,7 +78,7 @@ class Chef
# TX packets:41723949 errors:0 dropped:0 overruns:0 carrier:0
# collisions:0 txqueuelen:1000
# RX bytes:42664658792 (39.7 GiB) TX bytes:52722603938 (49.1 GiB)
- # Interrupt:30
+ # Interrupt:30
@status = shell_out("ifconfig")
@status.stdout.each_line do |line|
if !line[0..9].strip.empty?
diff --git a/spec/unit/provider/ifconfig_spec.rb b/spec/unit/provider/ifconfig_spec.rb
index da27d647ee..3732d75cc9 100644
--- a/spec/unit/provider/ifconfig_spec.rb
+++ b/spec/unit/provider/ifconfig_spec.rb
@@ -38,12 +38,19 @@ describe Chef::Provider::Ifconfig do
status = double("Status", exitstatus: 0)
@provider.instance_variable_set("@status", status)
@provider.current_resource = @current_resource
-
end
+
describe Chef::Provider::Ifconfig, "load_current_resource" do
+ let(:net_tools_version) { StringIO.new <<-EOS }
+net-tools 1.60
+ifconfig 1.42 (2001-04-13)
+EOS
+
before do
- @status = double(stdout: "", exitstatus: 1)
- allow(@provider).to receive(:shell_out).and_return(@status)
+ ifconfig = double(stdout: "", exitstatus: 1)
+ allow(@provider).to receive(:shell_out).and_return(ifconfig)
+ ifconfig_version = double(stdout: "", stderr: net_tools_version, exitstatus: 4)
+ allow(@provider).to receive(:shell_out).with("ifconfig --version").and_return(ifconfig_version)
@provider.load_current_resource
end
it "should track state of ifconfig failure" do