summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2016-04-07 14:54:50 -0700
committerTim Smith <tsmith84@gmail.com>2016-04-07 14:56:22 -0700
commit509c105df6d44928fe9f28dcf1832fb4a07325db (patch)
tree4a8e87e6745badbfb1fb31d279b86b3a234da3e7
parent572dc0577984d40538910659eecc42592f831752 (diff)
downloadohai-509c105df6d44928fe9f28dcf1832fb4a07325db.tar.gz
Updates based on feeback
-rw-r--r--lib/ohai/plugins/ec2.rb4
-rw-r--r--spec/unit/plugins/ec2_spec.rb14
2 files changed, 9 insertions, 9 deletions
diff --git a/lib/ohai/plugins/ec2.rb b/lib/ohai/plugins/ec2.rb
index 6f643188..aef493b1 100644
--- a/lib/ohai/plugins/ec2.rb
+++ b/lib/ohai/plugins/ec2.rb
@@ -21,8 +21,8 @@
# How we detect EC2 from easiest to hardest & least reliable
# 1. Ohai ec2 hint exists. This always works
# 2. Xen hypervisor UUID starts with 'ec2'. This catches Linux HVM & paravirt instances
-# 2. DMI data mentions amazon. This catches HVM instances in a VPC
-# 3. Kernel data mentioned Amazon. This catches Windows HVM & paravirt instances
+# 3. DMI data mentions amazon. This catches HVM instances in a VPC
+# 4. Kernel data mentioned Amazon. This catches Windows HVM & paravirt instances
require "ohai/mixin/ec2_metadata"
require "base64"
diff --git a/spec/unit/plugins/ec2_spec.rb b/spec/unit/plugins/ec2_spec.rb
index 1818d325..7ad3f5d8 100644
--- a/spec/unit/plugins/ec2_spec.rb
+++ b/spec/unit/plugins/ec2_spec.rb
@@ -259,7 +259,7 @@ describe Ohai::System, "plugin ec2" do
end # shared examples for ec2
describe "with ec2 dmi data" do
- it_should_behave_like "ec2"
+ it_behaves_like "ec2"
before(:each) do
plugin[:dmi] = { :bios => { :all_records => [ { :Version => "4.2.amazon" } ] } }
@@ -267,7 +267,7 @@ describe Ohai::System, "plugin ec2" do
end
describe "with amazon kernel data" do
- it_should_behave_like "ec2"
+ it_behaves_like "ec2"
before(:each) do
plugin[:kernel] = { :os_info => { :organization => "Amazon.com" } }
@@ -275,7 +275,7 @@ describe Ohai::System, "plugin ec2" do
end
describe "with EC2 Xen UUID" do
- it_should_behave_like "ec2"
+ it_behaves_like "ec2"
before(:each) do
allow(File).to receive(:exist?).with("/sys/hypervisor/uuid").and_return(true)
@@ -284,7 +284,7 @@ describe Ohai::System, "plugin ec2" do
end
describe "with non-EC2 Xen UUID" do
- it_should_behave_like "!ec2"
+ it_behaves_like "!ec2"
before(:each) do
allow(File).to receive(:exist?).with("/sys/hypervisor/uuid").and_return(true)
@@ -293,7 +293,7 @@ describe Ohai::System, "plugin ec2" do
end
describe "with ec2 hint file" do
- it_should_behave_like "ec2"
+ it_behaves_like "ec2"
before(:each) do
if windows?
@@ -307,7 +307,7 @@ describe Ohai::System, "plugin ec2" do
end
describe "with rackspace hint file" do
- it_should_behave_like "!ec2"
+ it_behaves_like "!ec2"
before(:each) do
allow(File).to receive(:exist?).with("/etc/chef/ohai/hints/rackspace.json").and_return(true)
@@ -318,7 +318,7 @@ describe Ohai::System, "plugin ec2" do
end
describe "without any hints that it is an ec2 system" do
- it_should_behave_like "!ec2"
+ it_behaves_like "!ec2"
before(:each) do
allow(File).to receive(:exist?).with("/etc/chef/ohai/hints/ec2.json").and_return(false)