Skip to content

Commit

Permalink
rename field (#396)
Browse files Browse the repository at this point in the history
  • Loading branch information
markdboyd authored Dec 20, 2024
1 parent 0812b6d commit cfd14a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
8 changes: 4 additions & 4 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -580,8 +580,8 @@ func TestCreateRDSInstanceWithEnabledLogGroups(t *testing.T) {
t.Error("The instance should have metadata")
}

if !slices.Contains(i.EnabledCloudWatchLogGroupExports, "foo") {
t.Error("expected EnabledCloudWatchLogGroupExports to contain 'foo'")
if !slices.Contains(i.EnabledCloudwatchLogGroupExports, "foo") {
t.Error("expected EnabledCloudwatchLogGroupExports to contain 'foo'")
}
}

Expand Down Expand Up @@ -929,8 +929,8 @@ func TestModifyEnableCloudwatchLogGroups(t *testing.T) {
t.Error("The instance should be saved in the DB")
}

if !slices.Contains(i.EnabledCloudWatchLogGroupExports, "foo") {
t.Error("expected EnabledCloudWatchLogGroupExports to contain 'foo'")
if !slices.Contains(i.EnabledCloudwatchLogGroupExports, "foo") {
t.Error("expected EnabledCloudwatchLogGroupExports to contain 'foo'")
}
}

Expand Down
6 changes: 2 additions & 4 deletions services/rds/rdsinstance.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,11 @@ type RDSInstance struct {
ParameterGroupFamily string `sql:"-"`
ParameterGroupName string `sql:"size(255)"`

EnabledCloudWatchLogGroupExports pq.StringArray `sql:"type:text[]"`
EnabledCloudwatchLogGroupExports pq.StringArray `sql:"type:text[]"`

StorageType string `sql:"size(255)"`
}

type EnabledCloudwatchLogGroupExports []string

func (u *RDSDatabaseUtils) FormatDBName(dbType string, database string) string {
switch dbType {
case "oracle-se1", "oracle-se2":
Expand Down Expand Up @@ -337,7 +335,7 @@ func (i *RDSInstance) setEnabledCloudwatchLogGroupExports(enabledLogGroups []str
// TODO: update this to set the enabled log groups when
// enabling log groups is supported by the broker
if len(enabledLogGroups) > 0 {
i.EnabledCloudWatchLogGroupExports = enabledLogGroups
i.EnabledCloudwatchLogGroupExports = enabledLogGroups
}
return nil
}

0 comments on commit cfd14a5

Please sign in to comment.