Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

Commit

Permalink
fix e2e tests (#194)
Browse files Browse the repository at this point in the history
* fix e2e tests
  • Loading branch information
roneli authored Sep 13, 2021
1 parent a6cf0a6 commit 5380393
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 38 deletions.
3 changes: 2 additions & 1 deletion client/mocks/builders_test.go
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 0 additions & 1 deletion resources/integration_tests/aws_ec2_ebs_volumes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
10 changes: 6 additions & 4 deletions resources/integration_tests/aws_ec2_images_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
Expand All @@ -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",
},
Expand Down
52 changes: 20 additions & 32 deletions resources/integration_tests/aws_ec2_vpcs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
}},
},
Expand All @@ -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",
},
}},
},
Expand All @@ -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",
},
}},
},
Expand All @@ -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",
},
}},
},
Expand Down

0 comments on commit 5380393

Please sign in to comment.