Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion operator/product-helm-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ resources:
sidecarInjector:
enabled: false
namespace: cnpg-system
namespace: cnpg-system
image:
repository: ""
digest: ""
28 changes: 28 additions & 0 deletions operator/src/internal/product/chart_values_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

package product

import (
"os"
"path/filepath"
"testing"

"sigs.k8s.io/yaml"
)

func TestChartValuesAreStrictYAML(t *testing.T) {
for _, chart := range []string{"documentdb-helm-chart", "product-helm-chart"} {
t.Run(chart, func(t *testing.T) {
path := filepath.Join("../../../", chart, "values.yaml")
data, err := os.ReadFile(path)
if err != nil {
t.Fatal(err)
}
var values map[string]any
if err := yaml.UnmarshalStrict(data, &values); err != nil {
t.Fatalf("%s must not contain duplicate YAML keys: %v", path, err)
}
})
}
}
Loading