MCPcopy
hub / github.com/argoproj/argo-workflows / TestConfigMapCacheLoadMiss

Function TestConfigMapCacheLoadMiss

workflow/controller/cache_test.go:71–82  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

69}
70
71func TestConfigMapCacheLoadMiss(t *testing.T) {
72 ctx := logging.TestContext(t.Context())
73 cancel, controller := newController(ctx)
74 defer cancel()
75
76 _, err := controller.kubeclientset.CoreV1().ConfigMaps("default").Create(ctx, &sampleConfigMapEmptyCacheEntry, metav1.CreateOptions{})
77 require.NoError(t, err)
78 c := cache.NewConfigMapCache("default", controller.kubeclientset, "whalesay-cache")
79 entry, err := c.Load(ctx, "hi-there-world")
80 require.NoError(t, err)
81 assert.Nil(t, entry)
82}
83
84func TestConfigMapCacheSave(t *testing.T) {
85 var MockParamValue = "Hello world"

Callers

nothing calls this directly

Calls 7

TestContextFunction · 0.92
NewConfigMapCacheFunction · 0.92
newControllerFunction · 0.85
cancelFunction · 0.85
ContextMethod · 0.65
CreateMethod · 0.65
LoadMethod · 0.65

Tested by

no test coverage detected