MCPcopy
hub / github.com/helm/helm / tsFixtureMemory

Function tsFixtureMemory

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

Source from the content-addressed store, hash-verified

53}
54
55func tsFixtureMemory(t *testing.T) *Memory {
56 t.Helper()
57 hs := []*rspb.Release{
58 // rls-a
59 releaseStub("rls-a", 4, "default", common.StatusDeployed),
60 releaseStub("rls-a", 1, "default", common.StatusSuperseded),
61 releaseStub("rls-a", 3, "default", common.StatusSuperseded),
62 releaseStub("rls-a", 2, "default", common.StatusSuperseded),
63 // rls-b
64 releaseStub("rls-b", 4, "default", common.StatusDeployed),
65 releaseStub("rls-b", 1, "default", common.StatusSuperseded),
66 releaseStub("rls-b", 3, "default", common.StatusSuperseded),
67 releaseStub("rls-b", 2, "default", common.StatusSuperseded),
68 // rls-c in other namespace
69 releaseStub("rls-c", 4, "mynamespace", common.StatusDeployed),
70 releaseStub("rls-c", 1, "mynamespace", common.StatusSuperseded),
71 releaseStub("rls-c", 3, "mynamespace", common.StatusSuperseded),
72 releaseStub("rls-c", 2, "mynamespace", common.StatusSuperseded),
73 }
74
75 mem := NewMemory()
76 for _, tt := range hs {
77 err := mem.Create(testKey(tt.Name, tt.Version), tt)
78 if err != nil {
79 t.Fatalf("Test setup failed to create: %s\n", err)
80 }
81 }
82 return mem
83}
84
85// newTestFixtureCfgMaps initializes a MockConfigMapsInterface.
86// ConfigMaps are created for each release provided.

Callers 6

TestMemoryCreateFunction · 0.85
TestMemoryGetFunction · 0.85
TestMemoryListFunction · 0.85
TestMemoryQueryFunction · 0.85
TestMemoryUpdateFunction · 0.85
TestMemoryDeleteFunction · 0.85

Calls 6

CreateMethod · 0.95
NewMemoryFunction · 0.85
HelperMethod · 0.80
FatalfMethod · 0.80
releaseStubFunction · 0.70
testKeyFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…