Skip to content

Commit

Permalink
Added enableDefaultUser
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnSharpe committed Oct 26, 2023
1 parent 6e7a739 commit 928466d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion database_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ func TestDatabase_Get(t *testing.T) {
"hashingPolicy": "custom"
},
"security": {
"enableDefaultUser": false,
"password": "test",
"sslClientAuthentication": false,
"sourceIps": [
Expand Down Expand Up @@ -286,6 +287,7 @@ func TestDatabase_Get(t *testing.T) {
},
},
Security: &databases.Security{
EnableDefaultUser: redis.Bool(false),
SSLClientAuthentication: redis.Bool(false),
SourceIPs: redis.StringSlice("0.0.0.0/0"),
Password: redis.String("test"),
Expand Down Expand Up @@ -337,7 +339,8 @@ func TestDatabase_Update(t *testing.T) {
"name": "dataset-size",
"value": 80
}
]
],
"enableDefaultUser": false
}`, `{
"taskId": "task",
"commandType": "databaseUpdateRequest",
Expand Down Expand Up @@ -395,6 +398,7 @@ func TestDatabase_Update(t *testing.T) {
Value: redis.Int(80),
},
},
EnableDefaultUser: redis.Bool(false),
})
require.NoError(t, err)
}
Expand Down
2 changes: 2 additions & 0 deletions service/databases/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ func (o RegexRule) String() string {
}

type Security struct {
EnableDefaultUser *bool `json:"enableDefaultUser,omitempty"`
SSLClientAuthentication *bool `json:"sslClientAuthentication,omitempty"`
SourceIPs []*string `json:"sourceIps,omitempty"`
Password *string `json:"password,omitempty"`
Expand Down Expand Up @@ -176,6 +177,7 @@ type UpdateDatabase struct {
Alerts []*UpdateAlert `json:"alerts,omitempty"`
EnableTls *bool `json:"enableTls,omitempty"`
RemoteBackup *DatabaseBackupConfig `json:"remoteBackup,omitempty"`
EnableDefaultUser *bool `json:"enableDefaultUser,omitempty"`
}

func (o UpdateDatabase) String() string {
Expand Down

0 comments on commit 928466d

Please sign in to comment.