summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorsawanoboly <sawanoboriyu@higanworks.com>2018-11-08 22:12:46 +0900
committersawanoboly <sawanoboriyu@higanworks.com>2018-11-08 22:12:46 +0900
commit53438d5b3ee2cc259e2a8a1e67d699ed15ac2868 (patch)
tree7e0587ff7fc63e8145f76cc48a7437b15449ee73 /spec
parent3888e9258157e545fc0ad5564186622d22f343fd (diff)
downloadohai-53438d5b3ee2cc259e2a8a1e67d699ed15ac2868.tar.gz
use dummy ipaddress and empty string
Signed-off-by: sawanoboly <sawanoboriyu@higanworks.com>
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/plugins/openstack_spec.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/unit/plugins/openstack_spec.rb b/spec/unit/plugins/openstack_spec.rb
index d9c2df4a..388b2ac9 100644
--- a/spec/unit/plugins/openstack_spec.rb
+++ b/spec/unit/plugins/openstack_spec.rb
@@ -156,7 +156,8 @@ EOM
"public-keys/0/" => "openssh-key",
"public-keys/0/openssh-key" => "SSH KEY DATA",
"security-groups" => "default",
- "public-ipv4" => "",
+ "public-ipv4" => "172.31.7.2",
+ "public-ipv6" => "",
"ami-manifest-path" => "FIXME",
"instance-type" => "opc-tester",
"instance-id" => "i-0000162a",
@@ -246,7 +247,10 @@ EOM
expect(plugin["openstack"]["security_groups"]).to eq(["default"])
end
it "reads the public_ipv4 from the metadata service" do
- expect(plugin["openstack"]["public_ipv4"]).to eq("")
+ expect(plugin["openstack"]["public_ipv4"]).to eq("172.31.7.2")
+ end
+ it "ignore the public_ipv6 from the metadata service when empty" do
+ expect(plugin["openstack"]).not_to have_key("public_ipv6")
end
it "reads the ami_manifest_path from the metadata service" do
expect(plugin["openstack"]["ami_manifest_path"]).to eq("FIXME")