Skip to content

Commit 9de405c

Browse files
grubernautstack72
authored andcommitted
provider/aws: Fix AWS EIP Assocaition Tests (hashicorp#11533)
Fixes `aws_eip_association` acceptance tests ``` $ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSEIPAssociation_basic' ==> Checking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /terraform/vendor/) 2017/01/30 18:31:28 Generated command/internal_plugin_list.go TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSEIPAssociation_basic -timeout 120m === RUN TestAccAWSEIPAssociation_basic --- PASS: TestAccAWSEIPAssociation_basic (142.33s) PASS ok github.com/hashicorp/terraform/builtin/providers/aws 142.354s ```
1 parent 2914a38 commit 9de405c

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎builtin/providers/aws/resource_aws_eip_association_test.go‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func TestAccAWSEIPAssociation_basic(t *testing.T) {
1818
Providers: testAccProviders,
1919
CheckDestroy: testAccCheckAWSEIPAssociationDestroy,
2020
Steps: []resource.TestStep{
21-
resource.TestStep{
21+
{
2222
Config: testAccAWSEIPAssociationConfig,
2323
Check: resource.ComposeTestCheckFunc(
2424
testAccCheckAWSEIPExists(
@@ -47,7 +47,7 @@ func TestAccAWSEIPAssociation_disappears(t *testing.T) {
4747
Providers: testAccProviders,
4848
CheckDestroy: testAccCheckAWSEIPAssociationDestroy,
4949
Steps: []resource.TestStep{
50-
resource.TestStep{
50+
{
5151
Config: testAccAWSEIPAssociationConfigDisappears,
5252
Check: resource.ComposeTestCheckFunc(
5353
testAccCheckAWSEIPExists(
@@ -168,10 +168,12 @@ resource "aws_eip" "bar" {
168168
resource "aws_eip_association" "by_allocation_id" {
169169
allocation_id = "${aws_eip.bar.0.id}"
170170
instance_id = "${aws_instance.foo.0.id}"
171+
depends_on = ["aws_instance.foo"]
171172
}
172173
resource "aws_eip_association" "by_public_ip" {
173174
public_ip = "${aws_eip.bar.1.public_ip}"
174175
instance_id = "${aws_instance.foo.1.id}"
176+
depends_on = ["aws_instance.foo"]
175177
}
176178
resource "aws_eip_association" "to_eni" {
177179
allocation_id = "${aws_eip.bar.2.id}"
@@ -180,6 +182,7 @@ resource "aws_eip_association" "to_eni" {
180182
resource "aws_network_interface" "baz" {
181183
subnet_id = "${aws_subnet.sub.id}"
182184
private_ips = ["192.168.0.10"]
185+
depends_on = ["aws_instance.foo"]
183186
attachment {
184187
instance = "${aws_instance.foo.0.id}"
185188
device_index = 1

0 commit comments

Comments
 (0)