MCPcopy Index your code
hub / github.com/databus23/helm-diff / TestManifestsWithRedactedSecrets

Function TestManifestsWithRedactedSecrets

diff/diff_test.go:982–1105  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

980 })
981}
982func TestManifestsWithRedactedSecrets(t *testing.T) {
983 ansi.DisableColors(true)
984
985 specSecretWithByteData := map[string]*manifest.MappingResult{
986 "default, foobar, Secret (v1)": {
987 Name: "default, foobar, Secret (v1)",
988 Kind: "Secret",
989 Content: `
990apiVersion: v1
991kind: Secret
992metadata:
993 name: foobar
994type: Opaque
995data:
996 key1: dmFsdWUx
997 key2: dmFsdWUy
998 key3: dmFsdWUz
999`,
1000 },
1001 }
1002
1003 specSecretWithByteDataChanged := map[string]*manifest.MappingResult{
1004 "default, foobar, Secret (v1)": {
1005 Name: "default, foobar, Secret (v1)",
1006 Kind: "Secret",
1007 Content: `
1008apiVersion: v1
1009kind: Secret
1010metadata:
1011 name: foobar
1012type: Opaque
1013data:
1014 key1: dmFsdWUxY2hhbmdlZA==
1015 key2: dmFsdWUy
1016 key4: dmFsdWU0
1017`,
1018 },
1019 }
1020
1021 specSecretWithStringData := map[string]*manifest.MappingResult{
1022 "default, foobar, Secret (v1)": {
1023 Name: "default, foobar, Secret (v1)",
1024 Kind: "Secret",
1025 Content: `
1026apiVersion: v1
1027kind: Secret
1028metadata:
1029 name: foobar
1030type: Opaque
1031stringData:
1032 key1: value1
1033 key2: value2
1034 key3: value3
1035`,
1036 },
1037 }
1038
1039 specSecretWithStringDataChanged := map[string]*manifest.MappingResult{

Callers

nothing calls this directly

Calls 2

ManifestsFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected