@@ -2,6 +2,7 @@ package test
22
33import (
44 "context"
5+ "fmt"
56 "strings"
67 "testing"
78
@@ -24,10 +25,13 @@ func (s *ComponentSuite) TestBasic() {
2425 const awsRegion = "us-east-2"
2526
2627 name := strings .ToLower (random .UniqueId ())
28+ password := random .UniqueId ()
2729 userName := "test_user"
28- inputs := map [string ]interface {}{
30+
31+ inputs := map [string ]any {
2932 "master_username" : userName ,
30- "name" : name ,
33+ "master_password" : password ,
34+ "name" : fmt .Sprintf ("%s-docdb" , name ),
3135 }
3236
3337 defer s .DestroyAtmosComponent (s .T (), component , stack , & inputs )
@@ -55,8 +59,8 @@ func (s *ComponentSuite) TestBasic() {
5559 replicasHost := atmos .Output (s .T (), options , "replicas_host" )
5660 assert .NotEmpty (s .T (), replicasHost )
5761
58- securityGroupId := atmos .Output (s .T (), options , "security_group_id" )
59- assert .NotEmpty (s .T (), securityGroupId )
62+ securityGroupID := atmos .Output (s .T (), options , "security_group_id" )
63+ assert .NotEmpty (s .T (), securityGroupID )
6064
6165 securityGroupArn := atmos .Output (s .T (), options , "security_group_arn" )
6266 assert .NotEmpty (s .T (), securityGroupArn )
@@ -72,11 +76,11 @@ func (s *ComponentSuite) TestBasic() {
7276 assert .Equal (s .T (), arn , * clusters .DBClusters [0 ].DBClusterArn )
7377 assert .Equal (s .T (), clusterName , * clusters .DBClusters [0 ].DBClusterIdentifier )
7478 assert .Equal (s .T (), readerEndpoint , * clusters .DBClusters [0 ].ReaderEndpoint )
75- assert .Equal (s .T (), securityGroupId , * clusters .DBClusters [0 ].VpcSecurityGroups [0 ].VpcSecurityGroupId )
79+ assert .Equal (s .T (), securityGroupID , * clusters .DBClusters [0 ].VpcSecurityGroups [0 ].VpcSecurityGroupId )
7680
7781 dnsDelegatedOptions := s .GetAtmosOptions ("dns-delegated" , "default-test" , nil )
78- delegatedDnsZoneId := atmos .Output (s .T (), dnsDelegatedOptions , "default_dns_zone_id" )
79- masterEndpointDNSRecord := aws .GetRoute53Record (s .T (), delegatedDnsZoneId , masterEndpoint , "CNAME" , awsRegion )
82+ delegatedDNSZoneID := atmos .Output (s .T (), dnsDelegatedOptions , "default_dns_zone_id" )
83+ masterEndpointDNSRecord := aws .GetRoute53Record (s .T (), delegatedDNSZoneID , masterEndpoint , "CNAME" , awsRegion )
8084 assert .Equal (s .T (), * masterEndpointDNSRecord .ResourceRecords [0 ].Value , * clusters .DBClusters [0 ].Endpoint )
8185
8286 s .DriftTest (component , stack , & inputs )
@@ -90,15 +94,14 @@ func (s *ComponentSuite) TestEnabledFlag() {
9094 s .VerifyEnabledFlag (component , stack , nil )
9195}
9296
93-
9497func TestRunSuite (t * testing.T ) {
9598 suite := new (ComponentSuite )
9699
97100 suite .AddDependency (t , "vpc" , "default-test" , nil )
98101
99102 subdomain := strings .ToLower (random .UniqueId ())
100- inputs := map [string ]interface {} {
101- "zone_config" : []map [string ]interface {} {
103+ inputs := map [string ]any {
104+ "zone_config" : []map [string ]any {
102105 {
103106 "subdomain" : subdomain ,
104107 "zone_name" : "components.cptest.test-automation.app" ,
0 commit comments