Skip to content

Commit 35cfcd7

Browse files
committed
feat: performance query factor in get/list SDK and test update
1 parent 4012933 commit 35cfcd7

File tree

2 files changed

+19
-12
lines changed

2 files changed

+19
-12
lines changed

database_test.go

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,16 @@ func TestDatabase_List(t *testing.T) {
137137
"name": "first-example",
138138
"protocol": "redis",
139139
"provider": "AWS",
140-
"region": "eu-west-1"
140+
"region": "eu-west-1",
141+
"queryPerformanceFactor": "Standard"
141142
},
142143
{
143144
"databaseId": 43,
144145
"name": "second-example",
145146
"protocol": "redis",
146147
"provider": "AWS",
147-
"region": "eu-west-1"
148+
"region": "eu-west-1",
149+
"queryPerformanceFactor": "Standard"
148150
}
149151
]
150152
}
@@ -170,18 +172,20 @@ func TestDatabase_List(t *testing.T) {
170172

171173
assert.Equal(t, []*databases.Database{
172174
{
173-
ID: redis.Int(42),
174-
Name: redis.String("first-example"),
175-
Protocol: redis.String("redis"),
176-
Provider: redis.String("AWS"),
177-
Region: redis.String("eu-west-1"),
175+
ID: redis.Int(42),
176+
Name: redis.String("first-example"),
177+
Protocol: redis.String("redis"),
178+
Provider: redis.String("AWS"),
179+
Region: redis.String("eu-west-1"),
180+
QueryPerformanceFactor: redis.String("Standard"),
178181
},
179182
{
180-
ID: redis.Int(43),
181-
Name: redis.String("second-example"),
182-
Protocol: redis.String("redis"),
183-
Provider: redis.String("AWS"),
184-
Region: redis.String("eu-west-1"),
183+
ID: redis.Int(43),
184+
Name: redis.String("second-example"),
185+
Protocol: redis.String("redis"),
186+
Provider: redis.String("AWS"),
187+
Region: redis.String("eu-west-1"),
188+
QueryPerformanceFactor: redis.String("Standard"),
185189
},
186190
}, actual)
187191

@@ -211,6 +215,7 @@ func TestDatabase_Get(t *testing.T) {
211215
"by": "operations-per-second",
212216
"value": 10000
213217
},
218+
"QueryPerformanceFactor": "Standard",
214219
"activatedOn": "2020-11-03T09:03:30Z",
215220
"lastModified": "2020-11-03T09:03:30Z",
216221
"publicEndpoint": "example.com:16668",
@@ -286,6 +291,7 @@ func TestDatabase_Get(t *testing.T) {
286291
By: redis.String("operations-per-second"),
287292
Value: redis.Int(10_000),
288293
},
294+
QueryPerformanceFactor: redis.String("Standard"),
289295
Clustering: &databases.Clustering{
290296
NumberOfShards: redis.Int(1),
291297
RegexRules: []*databases.RegexRule{

service/databases/model.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ type Database struct {
7979
PublicEndpoint *string `json:"publicEndpoint,omitempty"`
8080
RedisVersionCompliance *string `json:"redisVersionCompliance,omitempty"`
8181
Backup *Backup `json:"backup,omitempty"`
82+
QueryPerformanceFactor *string `json:"queryPerformanceFactor,omitempty"`
8283
}
8384

8485
func (o Database) String() string {

0 commit comments

Comments
 (0)