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

Commit

Permalink
Reduce long table names test on pg 11 (#38)
Browse files Browse the repository at this point in the history
* Reduce long table names test on pg 11

* upgrade sdk 0.1.6
  • Loading branch information
roneli authored Apr 22, 2021
1 parent 7453c09 commit f43161f
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
postgres:
strategy:
matrix:
dbversion: ['postgres:latest']
dbversion: ['postgres:latest', 'postgres:12', 'postgres:11']
go: ['1.15']
platform: [ubuntu-latest] # can not run in macOS and widnowsOS
runs-on: ${{ matrix.platform }}
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ require (
github.com/aws/aws-sdk-go-v2/service/sns v1.1.2
github.com/aws/aws-sdk-go-v2/service/sts v1.1.2
github.com/aws/smithy-go v1.3.0
github.com/cloudquery/cq-provider-sdk v0.1.4
github.com/cloudquery/cq-provider-sdk v0.1.6
github.com/cloudquery/faker/v3 v3.7.4
github.com/golang/mock v1.5.0
github.com/hashicorp/go-hclog v0.15.0
github.com/hashicorp/go-hclog v0.16.0
github.com/jackc/pgx/v4 v4.10.1
github.com/spf13/cast v1.3.0
github.com/stretchr/testify v1.7.0
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ github.com/aws/smithy-go v1.3.0 h1:awbB2OJBZ/Txj+c4q+qhDQs3Ob0sRhBuIIkOD4Aq8yc=
github.com/aws/smithy-go v1.3.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cloudquery/cq-provider-sdk v0.1.4 h1:3vEgR6vMXu9pUL2tLnKHygTT9pmvMLrBpZlWid11kzc=
github.com/cloudquery/cq-provider-sdk v0.1.4/go.mod h1:hM0STflFLkkoFk3lJnnjw03DyAkukvA2/LvjCG6wLD8=
github.com/cloudquery/cq-provider-sdk v0.1.6 h1:CCmSItk6XRT7I4KZs5ZuQWLoHUw9uLEEddMwpinCZaQ=
github.com/cloudquery/cq-provider-sdk v0.1.6/go.mod h1:m+HC+CM4Yx+8dR03Dc8qNQWEZjAiVKU2kVRy/xEYPig=
github.com/cloudquery/faker/v3 v3.7.4 h1:cCcU3r0yHpS0gqKj9rRKAGS0/hY33fBxbqCNFtDD4ec=
github.com/cloudquery/faker/v3 v3.7.4/go.mod h1:1b8WVG9Gh0T2hVo1a8dWeXfu0AhqSB6J/mmJaesqOeo=
github.com/cloudquery/go-funk v0.8.2-0.20210404151606-aacdb5e7797f h1:3cGpvb8FXWyW/u33zmilsLAPBcQ/GQNyba/GUjnmThk=
Expand Down Expand Up @@ -137,10 +137,10 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+
github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs=
github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
github.com/hashicorp/go-hclog v0.15.0 h1:qMuK0wxsoW4D0ddCCYwPSTm4KQv1X1ke3WmPWZ0Mvsk=
github.com/hashicorp/go-hclog v0.15.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
github.com/hashicorp/go-plugin v1.4.0 h1:b0O7rs5uiJ99Iu9HugEzsM67afboErkHUWddUSpUO3A=
github.com/hashicorp/go-plugin v1.4.0/go.mod h1:5fGEH17QVwTTcR0zV7yhDPLLmFX9YSZ38b18Udy6vYQ=
github.com/hashicorp/go-hclog v0.16.0 h1:uCeOEwSWGMwhJUdpUjk+1cVKIEfGu2/1nFXukimi2MU=
github.com/hashicorp/go-hclog v0.16.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
github.com/hashicorp/go-plugin v1.4.1 h1:6UltRQlLN9iZO513VveELp5xyaFxVD2+1OVylE+2E+w=
github.com/hashicorp/go-plugin v1.4.1/go.mod h1:5fGEH17QVwTTcR0zV7yhDPLLmFX9YSZ38b18Udy6vYQ=
github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb h1:b5rjCoWHc7eqmAS4/qyk21ZsHyb6Mxv/jykxvNTkU4M=
github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c=
Expand Down
6 changes: 3 additions & 3 deletions resources/ec2_instances.go
Original file line number Diff line number Diff line change
Expand Up @@ -529,8 +529,8 @@ func Ec2Instances() *schema.Table {
},
},
{
Name: "aws_ec2_instance_network_interface_instance_private_ip_addresses",
Resolver: fetchEc2InstanceNetworkInterfaceInstancePrivateIpAddresses,
Name: "aws_ec2_instance_network_interface_private_ip_addresses",
Resolver: fetchEc2InstanceNetworkInterfacePrivateIpAddresses,
Columns: []schema.Column{
{
Name: "instance_network_interface_id",
Expand Down Expand Up @@ -701,7 +701,7 @@ func fetchEc2InstanceNetworkInterfaceIpv6Addresses(_ context.Context, _ schema.C
res <- instanceNetworkInterface.Ipv6Addresses
return nil
}
func fetchEc2InstanceNetworkInterfaceInstancePrivateIpAddresses(__ context.Context, _ schema.ClientMeta, parent *schema.Resource, res chan interface{}) error {
func fetchEc2InstanceNetworkInterfacePrivateIpAddresses(__ context.Context, _ schema.ClientMeta, parent *schema.Resource, res chan interface{}) error {
instanceNetworkInterface, ok := parent.Item.(types.InstanceNetworkInterface)
if !ok {
return fmt.Errorf("not ec2 instance network interface")
Expand Down
10 changes: 5 additions & 5 deletions resources/ec2_security_groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ func Ec2SecurityGroups() *schema.Table {
Resolver: fetchEc2SecurityGroupIpPermissionsEgressIpRanges,
Columns: []schema.Column{
{
Name: "security_groupip_permissions_egress_id",
Name: "security_group_ip_permissions_egress_id",
Type: schema.TypeUUID,
Resolver: schema.ParentIdResolver,
},
Expand All @@ -223,7 +223,7 @@ func Ec2SecurityGroups() *schema.Table {
Resolver: fetchEc2SecurityGroupIpPermissionsEgressIpv6Ranges,
Columns: []schema.Column{
{
Name: "security_groupip_permissions_egress_id",
Name: "security_group_ip_permissions_egress_id",
Type: schema.TypeUUID,
Resolver: schema.ParentIdResolver,
},
Expand All @@ -242,7 +242,7 @@ func Ec2SecurityGroups() *schema.Table {
Resolver: fetchEc2SecurityGroupIpPermissionsEgressPrefixListIds,
Columns: []schema.Column{
{
Name: "security_groupip_permissions_egress_id",
Name: "security_group_ip_permissions_egress_id",
Type: schema.TypeUUID,
Resolver: schema.ParentIdResolver,
},
Expand All @@ -257,11 +257,11 @@ func Ec2SecurityGroups() *schema.Table {
},
},
{
Name: "aws_ec2_security_group_ip_permissions_egress_user_id_group_pairs",
Name: "aws_ec2_security_group_ip_permissions_egress_user_group_pairs",
Resolver: fetchEc2SecurityGroupIpPermissionsEgressUserIdGroupPairs,
Columns: []schema.Column{
{
Name: "security_groupip_permissions_egress_id",
Name: "security_group_ip_permissions_egress_id",
Type: schema.TypeUUID,
Resolver: schema.ParentIdResolver,
},
Expand Down
6 changes: 3 additions & 3 deletions resources/elasticbeanstalk_environments.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ func ElasticbeanstalkEnvironments() *schema.Table {
},
},
{
Name: "aws_elasticbeanstalk_environment_resources_load_balancer_listeners",
Resolver: fetchElasticbeanstalkEnvironmentResourcesLoadBalancerListeners,
Name: "aws_elasticbeanstalk_env_resources_load_balancer_listeners",
Resolver: fetchElasticbeanstalkEnvResourcesLoadBalancerListeners,
Columns: []schema.Column{
{
Name: "environment_id",
Expand Down Expand Up @@ -198,7 +198,7 @@ func fetchElasticbeanstalkEnvironmentLinks(ctx context.Context, meta schema.Clie
res <- p.EnvironmentLinks
return nil
}
func fetchElasticbeanstalkEnvironmentResourcesLoadBalancerListeners(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan interface{}) error {
func fetchElasticbeanstalkEnvResourcesLoadBalancerListeners(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan interface{}) error {
p := parent.Item.(types.EnvironmentDescription)
res <- p.Resources.LoadBalancer.Listeners
return nil
Expand Down
8 changes: 4 additions & 4 deletions resources/elbv2_load_balancers.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ func Elbv2LoadBalancers() *schema.Table {
},
Relations: []*schema.Table{
{
Name: "aws_elbv2_load_balancer_availability_zone_load_balancer_addresses",
Resolver: fetchElbv2LoadBalancerAvailabilityZoneLoadBalancerAddresses,
Name: "aws_elbv2_load_balancer_availability_zone_addresses",
Resolver: fetchElbv2LoadBalancerAvailabilityZoneAddresses,
Columns: []schema.Column{
{
Name: "load_balanceravailability_zone_id",
Name: "load_balancer_availability_zone_id",
Type: schema.TypeUUID,
Resolver: schema.ParentIdResolver,
},
Expand Down Expand Up @@ -170,7 +170,7 @@ func fetchElbv2LoadBalancerAvailabilityZones(ctx context.Context, meta schema.Cl
res <- p.AvailabilityZones
return nil
}
func fetchElbv2LoadBalancerAvailabilityZoneLoadBalancerAddresses(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan interface{}) error {
func fetchElbv2LoadBalancerAvailabilityZoneAddresses(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan interface{}) error {
p := parent.Item.(types.AvailabilityZone)
res <- p.LoadBalancerAddresses
return nil
Expand Down
6 changes: 3 additions & 3 deletions resources/redshift_clusters.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,8 @@ func RedshiftClusters() *schema.Table {
},
Relations: []*schema.Table{
{
Name: "aws_redshift_cluster_parameter_group_cluster_parameter_status_lists",
Resolver: fetchRedshiftClusterParameterGroupClusterParameterStatusLists,
Name: "aws_redshift_cluster_parameter_group_status_lists",
Resolver: fetchRedshiftClusterParameterGroupStatusLists,
Columns: []schema.Column{
{
Name: "cluster_parameter_group_id",
Expand Down Expand Up @@ -601,7 +601,7 @@ func fetchRedshiftClusterParameterGroups(_ context.Context, _ schema.ClientMeta,
res <- cluster.ClusterParameterGroups
return nil
}
func fetchRedshiftClusterParameterGroupClusterParameterStatusLists(_ context.Context, _ schema.ClientMeta, parent *schema.Resource, res chan interface{}) error {
func fetchRedshiftClusterParameterGroupStatusLists(_ context.Context, _ schema.ClientMeta, parent *schema.Resource, res chan interface{}) error {
parameterGroup, ok := parent.Item.(types.ClusterParameterGroupStatus)
if !ok {
return fmt.Errorf("not redshift cluster parameter group")
Expand Down

0 comments on commit f43161f

Please sign in to comment.