summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2017-04-03 12:13:00 -0700
committerTim Smith <tsmith@chef.io>2017-04-03 12:14:03 -0700
commit6d70c6cabcc50a5dbd7fba5233b54fbef83abcb2 (patch)
treea098318bef319c1ff32f3ddda62384b332a973cf
parenteffa84d1129c011b2e632aec0908ec401844bd1b (diff)
downloadohai-6d70c6cabcc50a5dbd7fba5233b54fbef83abcb2.tar.gz
Add basic check that both attributes are populated
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--spec/unit/plugins/cloud_v2_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/unit/plugins/cloud_v2_spec.rb b/spec/unit/plugins/cloud_v2_spec.rb
index eb770a34..9fbd8dc9 100644
--- a/spec/unit/plugins/cloud_v2_spec.rb
+++ b/spec/unit/plugins/cloud_v2_spec.rb
@@ -92,6 +92,18 @@ describe Ohai::System, "plugin cloud" do
end
end
+ describe "with a cloud mash" do
+ before do
+ @plugin[:ec2] = Mash.new
+ end
+
+ it "populates cloud public ip" do
+ @plugin.run
+ expect(@plugin[:cloud_v2]).to_not be_nil
+ expect(@plugin[:cloud]).to_not be_nil
+ end
+ end
+
describe "with EC2 mash" do
before do
@plugin[:ec2] = Mash.new