Compute Floating IP Test Update

Changes the test to require a network UUID rather than a name.
This commit is contained in:
Joe Topjian 2015-04-01 21:39:54 +00:00
parent ef4e03a729
commit 99ac8b4410
2 changed files with 4 additions and 4 deletions

View File

@ -64,8 +64,8 @@ func testAccPreCheck(t *testing.T) {
t.Fatal("OS_FLAVOR_ID or OS_FLAVOR_NAME must be set for acceptance tests") t.Fatal("OS_FLAVOR_ID or OS_FLAVOR_NAME must be set for acceptance tests")
} }
v = os.Getenv("OS_NETWORK_NAME") v = os.Getenv("OS_NETWORK_ID")
if v == "" { if v == "" {
t.Fatal("OS_NETWORK_NAME must be set for acceptance tests") t.Fatal("OS_NETWORK_ID must be set for acceptance tests")
} }
} }

View File

@ -67,10 +67,10 @@ func TestAccComputeV2Instance_floatingIPAttach(t *testing.T) {
floating_ip = "${openstack_compute_floatingip_v2.myip.address}" floating_ip = "${openstack_compute_floatingip_v2.myip.address}"
network { network {
name = "%s" uuid = "%s"
} }
}`, }`,
os.Getenv("OS_NETWORK_NAME")) os.Getenv("OS_NETWORK_ID"))
resource.Test(t, resource.TestCase{ resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) }, PreCheck: func() { testAccPreCheck(t) },