Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docdb to generated services #1111

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PROJECT_REPO := github.com/crossplane/$(PROJECT_NAME)
PLATFORMS ?= linux_amd64 linux_arm64

CODE_GENERATOR_COMMIT ?= c7d9f6bbcaf8f628910202fa126e03faa970502b
GENERATED_SERVICES="apigatewayv2,athena,cloudfront,cloudwatchlogs,dynamodb,elbv2,ec2,efs,eks,glue,iot,kafka,kinesis,kms,lambda,mq,rds,secretsmanager,servicediscovery,sfn,transfer,ram"
GENERATED_SERVICES="apigatewayv2,athena,cloudfront,cloudwatchlogs,docdb,dynamodb,elbv2,ec2,efs,eks,glue,iot,kafka,kinesis,kms,lambda,mq,rds,secretsmanager,servicediscovery,sfn,transfer,ram"

# kind-related versions
KIND_VERSION ?= v0.11.1
Expand Down
1 change: 1 addition & 0 deletions apis/docdb/v1alpha1/zz_db_cluster.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apis/docdb/v1alpha1/zz_db_cluster_parameter_group.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apis/docdb/v1alpha1/zz_db_instance.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apis/docdb/v1alpha1/zz_db_subnet_group.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions apis/docdb/v1alpha1/zz_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 21 additions & 6 deletions pkg/controller/docdb/dbcluster/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import (
svcutils "github.com/crossplane/provider-aws/pkg/controller/docdb"
)

const (
var (
testAvailabilityZone = "test-zone-a"
testOtherAvailabilityZone = "test-zone-b"
testBackupRetentionPeriod = 10
Expand Down Expand Up @@ -1984,11 +1984,25 @@ func TestCreate(t *testing.T) {
MockCreateDBClusterWithContext: func(c context.Context, cdpgi *docdb.CreateDBClusterInput, o []request.Option) (*docdb.CreateDBClusterOutput, error) {
return &docdb.CreateDBClusterOutput{
DBCluster: &docdb.DBCluster{
DBClusterIdentifier: awsclient.String(testDBClusterIdentifier),
DBClusterArn: awsclient.String(testDBClusterArn),
Endpoint: awsclient.String(testEndpoint),
ReaderEndpoint: awsclient.String(testReaderEndpoint),
Port: awsclient.Int64(testPort),
AvailabilityZones: []*string{
&testAvailabilityZone,
&testOtherAvailabilityZone,
},
BackupRetentionPeriod: awsclient.Int64(testBackupRetentionPeriod),
DBClusterParameterGroup: &testDBClusterParameterGroupName,
DBClusterIdentifier: awsclient.String(testDBClusterIdentifier),
DBClusterArn: awsclient.String(testDBClusterArn),
DeletionProtection: awsclient.Bool(true),
Endpoint: awsclient.String(testEndpoint),
Engine: &testEngine,
EngineVersion: &testEngineVersion,
KmsKeyId: &testKMSKeyID,
MasterUsername: &testMasterUserName,
ReaderEndpoint: awsclient.String(testReaderEndpoint),
Port: awsclient.Int64(testPort),
PreferredBackupWindow: &testPreferredBackupWindow,
PreferredMaintenanceWindow: &testPreferredMaintenanceWindow,
StorageEncrypted: awsclient.Bool(true),
},
}, nil
},
Expand Down Expand Up @@ -2066,6 +2080,7 @@ func TestCreate(t *testing.T) {
withEndpoint(testEndpoint),
withReaderEndpoint(testReaderEndpoint),
withMasterPasswordSecretRef(testMasterPasswordSecretNamespace, testMasterPasswordSecretName, testMasterPasswordSecretKey),
withStatusDBClusterParameterGroupName(testDBClusterParameterGroupName),
),
result: managed.ExternalCreation{
ConnectionDetails: generateConnectionDetails(
Expand Down
Loading