diff --git a/client/mocks/builders_test.go b/client/mocks/builders_test.go index a735d113a..b4a74f579 100644 --- a/client/mocks/builders_test.go +++ b/client/mocks/builders_test.go @@ -1,9 +1,10 @@ package mocks_test import ( - "github.com/aws/aws-sdk-go-v2/aws" "testing" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/autoscaling" autoscalingTypes "github.com/aws/aws-sdk-go-v2/service/autoscaling/types" "github.com/aws/aws-sdk-go-v2/service/cloudfront" diff --git a/resources/integration_tests/aws_ec2_ebs_volumes_test.go b/resources/integration_tests/aws_ec2_ebs_volumes_test.go index d7a9cc7fe..fcac6145a 100644 --- a/resources/integration_tests/aws_ec2_ebs_volumes_test.go +++ b/resources/integration_tests/aws_ec2_ebs_volumes_test.go @@ -19,7 +19,6 @@ func TestIntegrationEc2EbsVolumes(t *testing.T) { "volume_type": "gp2", "multi_attach_enabled": false, "encrypted": false, - "fast_restored": false, "size": float64(5), "tags": map[string]interface{}{ "Type": "integration_test", diff --git a/resources/integration_tests/aws_ec2_images_test.go b/resources/integration_tests/aws_ec2_images_test.go index d9d31e599..49337e184 100644 --- a/resources/integration_tests/aws_ec2_images_test.go +++ b/resources/integration_tests/aws_ec2_images_test.go @@ -38,14 +38,15 @@ func TestIntegrationEc2Images(t *testing.T) { { Name: "aws_ec2_image_block_device_mappings", ForeignKeyName: "image_cq_id", + Filter: func(sq squirrel.SelectBuilder, res *providertest.ResourceIntegrationTestData) squirrel.SelectBuilder { + return sq.Where(squirrel.Eq{"device_name": "/dev/xvda"}) + }, ExpectedValues: []providertest.ExpectedValue{{ Count: 1, Data: map[string]interface{}{ "device_name": "/dev/xvda", "ebs_delete_on_termination": true, "ebs_encrypted": false, - "ebs_iops": float64(0), - "ebs_throughput": float64(0), "ebs_volume_size": float64(8), "ebs_volume_type": "gp2", }, @@ -54,14 +55,15 @@ func TestIntegrationEc2Images(t *testing.T) { { Name: "aws_ec2_image_block_device_mappings", ForeignKeyName: "image_cq_id", + Filter: func(sq squirrel.SelectBuilder, res *providertest.ResourceIntegrationTestData) squirrel.SelectBuilder { + return sq.Where(squirrel.Eq{"device_name": "/dev/xvdb"}) + }, ExpectedValues: []providertest.ExpectedValue{{ Count: 1, Data: map[string]interface{}{ "device_name": "/dev/xvdb", "ebs_delete_on_termination": true, "ebs_encrypted": false, - "ebs_iops": float64(0), - "ebs_throughput": float64(0), "ebs_volume_size": float64(20), "ebs_volume_type": "gp2", }, diff --git a/resources/integration_tests/aws_ec2_vpcs_test.go b/resources/integration_tests/aws_ec2_vpcs_test.go index 2bdaebf8d..b58d0ba92 100644 --- a/resources/integration_tests/aws_ec2_vpcs_test.go +++ b/resources/integration_tests/aws_ec2_vpcs_test.go @@ -245,14 +245,12 @@ func TestIntegrationEc2NetworkAcls(t *testing.T) { ExpectedValues: []providertest.ExpectedValue{{ Count: 1, Data: map[string]interface{}{ - "icmp_type_code": float64(0), - "egress": true, - "icmp_type_code_type": float64(0), - "ipv6_cidr_block": nil, - "port_range_from": float64(443), - "port_range_to": float64(443), - "protocol": "6", - "rule_action": "allow", + "egress": true, + "ipv6_cidr_block": nil, + "port_range_from": float64(443), + "port_range_to": float64(443), + "protocol": "6", + "rule_action": "allow", }, }}, }, @@ -262,14 +260,10 @@ func TestIntegrationEc2NetworkAcls(t *testing.T) { ExpectedValues: []providertest.ExpectedValue{{ Count: 1, Data: map[string]interface{}{ - "egress": true, - "icmp_type_code": float64(0), - "icmp_type_code_type": float64(0), - "ipv6_cidr_block": nil, - "port_range_from": float64(0), - "port_range_to": float64(0), - "protocol": "-1", - "rule_action": "deny", + "egress": true, + "ipv6_cidr_block": nil, + "protocol": "-1", + "rule_action": "deny", }, }}, }, @@ -279,14 +273,12 @@ func TestIntegrationEc2NetworkAcls(t *testing.T) { ExpectedValues: []providertest.ExpectedValue{{ Count: 1, Data: map[string]interface{}{ - "egress": false, - "icmp_type_code": float64(0), - "icmp_type_code_type": float64(0), - "ipv6_cidr_block": nil, - "port_range_from": float64(80), - "port_range_to": float64(80), - "protocol": "6", - "rule_action": "allow", + "egress": false, + "ipv6_cidr_block": nil, + "port_range_from": float64(80), + "port_range_to": float64(80), + "protocol": "6", + "rule_action": "allow", }, }}, }, @@ -296,14 +288,10 @@ func TestIntegrationEc2NetworkAcls(t *testing.T) { ExpectedValues: []providertest.ExpectedValue{{ Count: 1, Data: map[string]interface{}{ - "egress": false, - "icmp_type_code": float64(0), - "icmp_type_code_type": float64(0), - "ipv6_cidr_block": nil, - "port_range_from": float64(0), - "port_range_to": float64(0), - "protocol": "-1", - "rule_action": "deny", + "egress": false, + "ipv6_cidr_block": nil, + "protocol": "-1", + "rule_action": "deny", }, }}, },