summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2016-08-08 13:32:59 -0700
committerJohn Keiser <john@johnkeiser.com>2016-08-08 13:32:59 -0700
commitce1458cf8a0c0732e717ce680d84d4667d7d3c37 (patch)
tree07f1eb1ac6aa7058b133192044f9c6d1a65a7ec1 /spec/support
parent7ae019e9a12cb310e45512d7091b44c849e936da (diff)
downloadchef-ce1458cf8a0c0732e717ce680d84d4667d7d3c37.tar.gz
Revert "Merge pull request #5123 from chef/lcg/resolv-replace"
This reverts commit e8877cd363642ed6757c48d1ed5ab35509d87e22, reversing changes made to 162d988d3bcfce2773ef2831fa33e416f53731f6.
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/platform_helpers.rb4
-rw-r--r--spec/support/shared/unit/provider/file.rb25
2 files changed, 0 insertions, 29 deletions
diff --git a/spec/support/platform_helpers.rb b/spec/support/platform_helpers.rb
index 783429161a..9ba56a15e3 100644
--- a/spec/support/platform_helpers.rb
+++ b/spec/support/platform_helpers.rb
@@ -138,10 +138,6 @@ def freebsd?
!!(RUBY_PLATFORM =~ /freebsd/)
end
-def linux?
- !!(RUBY_PLATFORM =~ /linux/)
-end
-
def debian_family?
!!(ohai[:platform_family] == "debian")
end
diff --git a/spec/support/shared/unit/provider/file.rb b/spec/support/shared/unit/provider/file.rb
index ee3438da70..cb539ffbc3 100644
--- a/spec/support/shared/unit/provider/file.rb
+++ b/spec/support/shared/unit/provider/file.rb
@@ -683,31 +683,6 @@ shared_examples_for Chef::Provider::File do
end
end
- context "do_resolv_conf_fixup" do
- %w{/resolv.conf /etc/resolv.con /etc/foo/resolv.conf /c/resolv.conf}.each do |path|
- context "when managing #{path}" do
- let(:resource_path) { path }
- it "does not reload the nameservers" do
- expect(Resolv::DefaultResolver).not_to receive(:replace_resolvers)
- provider.send(:do_resolv_conf_fixup)
- end
- end
- end
- context "when managing /etc/resolv.conf", linux_only: true do
- let(:resource_path) { "/etc/resolv.conf" }
- it "reloads the nameservers on linux" do
- expect(Resolv::DefaultResolver).to receive(:replace_resolvers)
- provider.send(:do_resolv_conf_fixup)
- end
- end
- context "when managing /etc/resolv.conf", non_linux_only: true do
- let(:resource_path) { "/etc/resolv.conf" }
- it "does not reload the nameservers on non-linux" do
- expect(Resolv::DefaultResolver).not_to receive(:replace_resolvers)
- provider.send(:do_resolv_conf_fixup)
- end
- end
- end
end
context "action delete" do