88 "github.com/hashicorp/terraform/terraform"
99
1010 "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/floatingips"
11- "github.com/gophercloud/gophercloud/openstack/compute/v2/servers"
1211)
1312
1413func TestAccComputeV2FloatingIP_basic (t * testing.T ) {
@@ -29,26 +28,6 @@ func TestAccComputeV2FloatingIP_basic(t *testing.T) {
2928 })
3029}
3130
32- func TestAccComputeV2FloatingIP_attach (t * testing.T ) {
33- var instance servers.Server
34- var fip floatingips.FloatingIP
35- resource .Test (t , resource.TestCase {
36- PreCheck : func () { testAccPreCheck (t ) },
37- Providers : testAccProviders ,
38- CheckDestroy : testAccCheckComputeV2FloatingIPDestroy ,
39- Steps : []resource.TestStep {
40- resource.TestStep {
41- Config : testAccComputeV2FloatingIP_attach ,
42- Check : resource .ComposeTestCheckFunc (
43- testAccCheckComputeV2FloatingIPExists ("openstack_compute_floatingip_v2.fip_1" , & fip ),
44- testAccCheckComputeV2InstanceExists ("openstack_compute_instance_v2.instance_1" , & instance ),
45- testAccCheckComputeV2InstanceFloatingIPAttach (& instance , & fip ),
46- ),
47- },
48- },
49- })
50- }
51-
5231func testAccCheckComputeV2FloatingIPDestroy (s * terraform.State ) error {
5332 config := testAccProvider .Meta ().(* Config )
5433 computeClient , err := config .computeV2Client (OS_REGION_NAME )
@@ -106,18 +85,3 @@ const testAccComputeV2FloatingIP_basic = `
10685resource "openstack_compute_floatingip_v2" "fip_1" {
10786}
10887`
109-
110- var testAccComputeV2FloatingIP_attach = fmt .Sprintf (`
111- resource "openstack_compute_floatingip_v2" "fip_1" {
112- }
113-
114- resource "openstack_compute_instance_v2" "instance_1" {
115- name = "instance_1"
116- security_groups = ["default"]
117- floating_ip = "${openstack_compute_floatingip_v2.fip_1.address}"
118-
119- network {
120- uuid = "%s"
121- }
122- }
123- ` , OS_NETWORK_ID )
0 commit comments