(t *testing.T)
| 533 | } |
| 534 | |
| 535 | func 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 | } |
nothing calls this directly
no test coverage detected