Skip to content

Commit

Permalink
do not overwrite kibana config in test (#8141)
Browse files Browse the repository at this point in the history
  • Loading branch information
kvalliyurnatt authored Oct 22, 2024
1 parent 8f3ca55 commit 62eb1da
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions test/e2e/test/kibana/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,15 @@ func (b Builder) WithAPMIntegration() Builder {
}

func (b Builder) WithConfig(config map[string]interface{}) Builder {
b.Kibana.Spec.Config = &commonv1.Config{
Data: config,
if b.Kibana.Spec.Config == nil || b.Kibana.Spec.Config.Data == nil {
b.Kibana.Spec.Config = &commonv1.Config{
Data: config,
}
} else {
for k, v := range config {
b.Kibana.Spec.Config.Data[k] = v
}
}

return b
}

Expand Down

0 comments on commit 62eb1da

Please sign in to comment.