MCPcopy Index your code
hub / github.com/jetify-com/devbox / TestGitPluginFileContentCacheInvalidTTL

Function TestGitPluginFileContentCacheInvalidTTL

internal/plugin/git_test.go:535–552  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

533}
534
535func TestGitPluginFileContentCacheInvalidTTL(t *testing.T) {
536 t.Setenv("DEVBOX_X_GITHUB_PLUGIN_CACHE_TTL", "not-a-duration")
537 t.Cleanup(func() { _ = gitCache.Clear() })
538
539 plugin := &gitPlugin{
540 ref: &flake.Ref{
541 Type: flake.TypeGit,
542 URL: "file:///doesnt-matter",
543 Ref: "main",
544 },
545 name: "test-invalid-ttl",
546 }
547
548 _, err := plugin.FileContent("plugin.json")
549 if err == nil {
550 t.Fatal("expected error for invalid TTL, got nil")
551 }
552}

Callers

nothing calls this directly

Calls 1

FileContentMethod · 0.95

Tested by

no test coverage detected