MCPcopy
hub / github.com/helm/helm / TestStorageCreate

Function TestStorageCreate

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

Source from the content-addressed store, hash-verified

33)
34
35func TestStorageCreate(t *testing.T) {
36 // initialize storage
37 storage := Init(driver.NewMemory())
38
39 // create fake release
40 rls := ReleaseTestData{
41 Name: "angry-beaver",
42 Version: 1,
43 }.ToRelease()
44
45 assertErrNil(t.Fatal, storage.Create(rls), "StoreRelease")
46
47 // fetch the release
48 res, err := storage.Get(rls.Name, rls.Version)
49 assertErrNil(t.Fatal, err, "QueryRelease")
50
51 // verify the fetched and created release are the same
52 if !reflect.DeepEqual(rls, res) {
53 t.Fatalf("Expected %v, got %v", rls, res)
54 }
55}
56
57func TestStorageUpdate(t *testing.T) {
58 // initialize storage

Callers

nothing calls this directly

Calls 7

NewMemoryFunction · 0.92
InitFunction · 0.85
assertErrNilFunction · 0.85
ToReleaseMethod · 0.80
FatalfMethod · 0.80
CreateMethod · 0.65
GetMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…