Skip to content

Commit 4287b8b

Browse files
committed
fixed bdbid parsing
1 parent 460ea94 commit 4287b8b

File tree

6 files changed

+17
-7
lines changed

6 files changed

+17
-7
lines changed

maintnotifications/e2e/config_parser_test.go

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ type DatabaseEndpoint struct {
3030

3131
// DatabaseConfig represents the configuration for a single database
3232
type DatabaseConfig struct {
33-
BdbID int `json:"bdb_id,omitempty"`
33+
BdbID interface{} `json:"bdb_id,omitempty"`
3434
Username string `json:"username,omitempty"`
3535
Password string `json:"password,omitempty"`
3636
TLS bool `json:"tls"`
@@ -157,13 +157,23 @@ func GetDatabaseConfig(databasesConfig DatabasesConfig, databaseName string) (*R
157157
return nil, fmt.Errorf("no endpoints found in database configuration")
158158
}
159159

160+
var bdbId int
161+
switch (dbConfig.BdbID).(type) {
162+
case int:
163+
bdbId = dbConfig.BdbID.(int)
164+
case float64:
165+
bdbId = int(dbConfig.BdbID.(float64))
166+
case string:
167+
bdbId, _ = strconv.Atoi(dbConfig.BdbID.(string))
168+
}
169+
160170
return &RedisConnectionConfig{
161171
Host: host,
162172
Port: port,
163173
Username: dbConfig.Username,
164174
Password: dbConfig.Password,
165175
TLS: dbConfig.TLS,
166-
BdbID: dbConfig.BdbID,
176+
BdbID: bdbId,
167177
CertificatesLocation: dbConfig.CertificatesLocation,
168178
Endpoints: dbConfig.Endpoints,
169179
}, nil

maintnotifications/e2e/scenario_endpoint_types_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func TestEndpointTypesPushNotifications(t *testing.T) {
6161
}()
6262

6363
// Create client factory from configuration
64-
factory, err := CreateTestClientFactory("m-standalone")
64+
factory, err := CreateTestClientFactory("m-standard")
6565
if err != nil {
6666
t.Skipf("Enterprise cluster not available, skipping endpoint types test: %v", err)
6767
}

maintnotifications/e2e/scenario_push_notifications_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func TestPushNotifications(t *testing.T) {
5959
}()
6060

6161
// Create client factory from configuration
62-
factory, err := CreateTestClientFactory("m-standalone")
62+
factory, err := CreateTestClientFactory("m-standard")
6363
if err != nil {
6464
t.Skipf("Enterprise cluster not available, skipping push notification tests: %v", err)
6565
}

maintnotifications/e2e/scenario_stress_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func TestStressPushNotifications(t *testing.T) {
4949
}()
5050

5151
// Create client factory from configuration
52-
factory, err := CreateTestClientFactory("m-standalone")
52+
factory, err := CreateTestClientFactory("m-standard")
5353
if err != nil {
5454
t.Skipf("Enterprise cluster not available, skipping stress test: %v", err)
5555
}

maintnotifications/e2e/scenario_timeout_configs_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ func TestTimeoutConfigurationsPushNotifications(t *testing.T) {
7777
}()
7878

7979
// Create client factory from configuration
80-
factory, err := CreateTestClientFactory("m-standalone")
80+
factory, err := CreateTestClientFactory("m-standard")
8181
if err != nil {
8282
t.Skipf("Enterprise cluster not available, skipping timeout configs test: %v", err)
8383
}

maintnotifications/e2e/scenario_tls_configs_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ func TestTLSConfigurationsPushNotifications(t *testing.T) {
7474
}()
7575

7676
// Create client factory from configuration
77-
factory, err := CreateTestClientFactory("m-standalone")
77+
factory, err := CreateTestClientFactory("m-standard")
7878
if err != nil {
7979
t.Skipf("Enterprise cluster not available, skipping TLS configs test: %v", err)
8080
}

0 commit comments

Comments
 (0)