MCPcopy
hub / github.com/helm/helm / TestSecretGet

Function TestSecretGet

pkg/storage/driver/secrets_test.go:37–55  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

35}
36
37func TestSecretGet(t *testing.T) {
38 vers := 1
39 name := "smug-pigeon"
40 namespace := "default"
41 key := testKey(name, vers)
42 rel := releaseStub(name, vers, namespace, common.StatusDeployed)
43
44 secrets := newTestFixtureSecrets(t, []*rspb.Release{rel}...)
45
46 // get release with key
47 got, err := secrets.Get(key)
48 if err != nil {
49 t.Fatalf("Failed to get release: %s", err)
50 }
51 // compare fetched release with original
52 if !reflect.DeepEqual(rel, got) {
53 t.Errorf("Expected {%v}, got {%v}", rel, got)
54 }
55}
56
57func TestUNcompressedSecretGet(t *testing.T) {
58 vers := 1

Callers

nothing calls this directly

Calls 5

newTestFixtureSecretsFunction · 0.85
FatalfMethod · 0.80
testKeyFunction · 0.70
releaseStubFunction · 0.70
GetMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…