diff options
author | Tim Smith <tsmith84@gmail.com> | 2021-10-25 07:23:47 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2021-10-25 07:23:47 -0700 |
commit | 74115ca104e9908ab2b7b0824753bb618c1c57fa (patch) | |
tree | 5f4c23b4e7b1afd92a726fba0e5cd4cfafa31fbf | |
parent | 563784a91e772719bcb21217c761c5c75974b6f1 (diff) | |
download | ohai-74115ca104e9908ab2b7b0824753bb618c1c57fa.tar.gz |
Update quotes
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | lib/ohai/plugins/azure.rb | 2 | ||||
-rw-r--r-- | spec/unit/plugins/azure_spec.rb | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/ohai/plugins/azure.rb b/lib/ohai/plugins/azure.rb index f8224666..c21b8ac7 100644 --- a/lib/ohai/plugins/azure.rb +++ b/lib/ohai/plugins/azure.rb @@ -48,7 +48,7 @@ Ohai.plugin(:Azure) do # check for either the waagent or the unknown-245 DHCP option that Azure uses # http://blog.mszcool.com/index.php/2015/04/detecting-if-a-virtual-machine-runs-in-microsoft-azure-linux-windows-to-protect-your-software-when-distributed-via-the-azure-marketplace/ def has_waagent? - if file_exist?("/usr/sbin/waagent") || dir_exist?('C:\WindowsAzure') + if file_exist?("/usr/sbin/waagent") || dir_exist?("C:\\WindowsAzure") logger.trace("Plugin Azure: Found waagent used by Azure.") true end diff --git a/spec/unit/plugins/azure_spec.rb b/spec/unit/plugins/azure_spec.rb index 1ddfe3d1..4d875e80 100644 --- a/spec/unit/plugins/azure_spec.rb +++ b/spec/unit/plugins/azure_spec.rb @@ -135,7 +135,7 @@ describe Ohai::System, "plugin azure" do before do allow(plugin).to receive(:hint?).with("azure").and_return(false) allow(plugin).to receive(:file_exist?).with("/usr/sbin/waagent").and_return(false) - allow(plugin).to receive(:dir_exist?).with('C:\WindowsAzure').and_return(false) + allow(plugin).to receive(:dir_exist?).with("C:\\WindowsAzure").and_return(false) allow(plugin).to receive(:file_exist?).with("/var/lib/dhcp/dhclient.eth0.leases").and_return(true) @double_file = double("/var/lib/dhcp/dhclient.eth0.leases") allow(@double_file).to receive(:each) @@ -169,7 +169,7 @@ describe Ohai::System, "plugin azure" do allow(plugin).to receive(:hint?).with("rackspace").and_return(true) allow(plugin).to receive(:hint?).with("azure").and_return(false) allow(plugin).to receive(:file_exist?).with("/usr/sbin/waagent").and_return(false) - allow(plugin).to receive(:dir_exist?).with('C:\WindowsAzure').and_return(false) + allow(plugin).to receive(:dir_exist?).with("C:\\WindowsAzure").and_return(false) allow(plugin).to receive(:file_exist?).with("/var/lib/dhcp/dhclient.eth0.leases").and_return(false) end @@ -180,7 +180,7 @@ describe Ohai::System, "plugin azure" do before do allow(plugin).to receive(:hint?).with("azure").and_return(false) allow(plugin).to receive(:file_exist?).with("/usr/sbin/waagent").and_return(true) - allow(plugin).to receive(:dir_exist?).with('C:\WindowsAzure').and_return(false) + allow(plugin).to receive(:dir_exist?).with("C:\\WindowsAzure").and_return(false) end it_behaves_like "azure" @@ -190,7 +190,7 @@ describe Ohai::System, "plugin azure" do before do allow(plugin).to receive(:hint?).with("azure").and_return(false) allow(plugin).to receive(:file_exist?).with("/usr/sbin/waagent").and_return(false) - allow(plugin).to receive(:dir_exist?).with('C:\WindowsAzure').and_return(true) + allow(plugin).to receive(:dir_exist?).with("C:\\WindowsAzure").and_return(true) end it_behaves_like "azure" @@ -200,7 +200,7 @@ describe Ohai::System, "plugin azure" do before do allow(plugin).to receive(:hint?).with("azure").and_return(false) allow(plugin).to receive(:file_exist?).with("/usr/sbin/waagent").and_return(false) - allow(plugin).to receive(:dir_exist?).with('C:\WindowsAzure').and_return(false) + allow(plugin).to receive(:dir_exist?).with("C:\\WindowsAzure").and_return(false) allow(plugin).to receive(:file_exist?).with("/var/lib/dhcp/dhclient.eth0.leases").and_return(true) @double_file = double("/var/lib/dhcp/dhclient.eth0.leases") allow(@double_file).to receive(:each) |