Skip to content

Commit

Permalink
Update modules/yugabytedb/yugabytedb.go
Browse files Browse the repository at this point in the history
Co-authored-by: Steven Hartland <[email protected]>
  • Loading branch information
henripqt and stevenh authored Oct 15, 2024
1 parent 6b09e71 commit a51e4dd
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions modules/yugabytedb/yugabytedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,17 @@ func (y *YugabyteDBContainer) YCQLConfigureClusterConfig(ctx context.Context, cf
)

for _, env := range inspect.Config.Env {
parts := strings.SplitN(env, "=", 2)
switch parts[0] {
key, val, found := strings.Cut(env, "=")
if !found {
continue
}
switch key {
case ycqlKeyspaceEnv:
keyspace = parts[1]
keyspace = val
case ycqlUserNameEnv:
user = parts[1]
user = val
case ycqlPasswordEnv:
password = parts[1]
password = val
}
}

Expand Down

0 comments on commit a51e4dd

Please sign in to comment.