Add floating IP association in aceptance tests

This commit is contained in:
Guillaume Giamarchi 2015-04-01 11:27:56 +02:00
parent c0b85d4939
commit 56aa764b94
2 changed files with 14 additions and 7 deletions

View File

@ -81,6 +81,11 @@ func testAccCheckComputeV2FloatingIPExists(t *testing.T, n string, kp *floatingi
}
}
var testAccComputeV2FloatingIP_basic = fmt.Sprintf(`
var testAccComputeV2FloatingIP_basic = `
resource "openstack_compute_floatingip_v2" "foo" {
}`)
}
resource "openstack_compute_instance_v2" "bar" {
name = "terraform-acc-floating-ip-test"
floating_ip = "${openstack_compute_floatingip_v2.foo.address}"
}`

View File

@ -81,9 +81,11 @@ func testAccCheckNetworkingV2FloatingIPExists(t *testing.T, n string, kp *floati
}
}
var testAccNetworkingV2FloatingIP_basic = fmt.Sprintf(`
var testAccNetworkingV2FloatingIP_basic = `
resource "openstack_networking_floatingip_v2" "foo" {
region = "%s"
pool = "%s"
}`,
OS_REGION_NAME, OS_POOL_NAME)
}
resource "openstack_compute_instance_v2" "bar" {
name = "terraform-acc-floating-ip-test"
floating_ip = "${openstack_networking_floatingip_v2.foo.address}"
}`