MCPcopy Create free account
hub / github.com/github/gh-aw / TestActionCacheLoadNonExistent

Function TestActionCacheLoadNonExistent

pkg/workflow/action_cache_test.go:80–96  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

78}
79
80func TestActionCacheLoadNonExistent(t *testing.T) {
81 // Create temporary directory for testing
82 tmpDir := testutil.TempDir(t, "test-*")
83
84 cache := NewActionCache(tmpDir)
85
86 // Try to load non-existent cache - should not error
87 err := cache.Load()
88 if err != nil {
89 t.Errorf("Loading non-existent cache should not error, got: %v", err)
90 }
91
92 // Cache should be empty
93 if len(cache.Entries) != 0 {
94 t.Errorf("Expected empty cache, got %d entries", len(cache.Entries))
95 }
96}
97
98func TestActionCacheGetCachePath(t *testing.T) {
99 tmpDir := testutil.TempDir(t, "test-*")

Callers

nothing calls this directly

Calls 4

LoadMethod · 0.95
TempDirFunction · 0.92
NewActionCacheFunction · 0.85
ErrorfMethod · 0.45

Tested by

no test coverage detected