Publish Claude Code Binaries / Stage and publish binaries (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-arm64 (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build linux-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build windows-amd64 (push) Canceled after 0s
Sync Tutti Agent Skills / sync (push) Canceled after 0s
Windows Agent Adapters / Test Windows agent adapters (push) Canceled after 0s
Windows Daemon Adapters / Test Windows daemon adapters (push) Canceled after 0s
Publish Tutti App Runtime / Publish runtime catalog (push) Canceled after 0s
28 lines
773 B
Go
28 lines
773 B
Go
package agentextension
|
|
|
|
import (
|
|
"context"
|
|
"errors"
|
|
"os"
|
|
"testing"
|
|
)
|
|
|
|
func TestRuntimeExecutableIdentityCacheHonorsCanceledFingerprintContext(t *testing.T) {
|
|
executable, err := os.Executable()
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
cache := newRuntimeExecutableIdentityCache()
|
|
ctx, cancel := context.WithCancel(context.Background())
|
|
cancel()
|
|
if _, err := cache.load(ctx, executable); !errors.Is(err, context.Canceled) {
|
|
t.Fatalf("canceled identity load error = %v", err)
|
|
}
|
|
if len(cache.entries) != 0 {
|
|
t.Fatalf("canceled identity load cached %d entries", len(cache.entries))
|
|
}
|
|
if identity, err := cache.load(context.Background(), executable); err != nil || identity == nil {
|
|
t.Fatalf("identity load after cancellation = %#v, error = %v", identity, err)
|
|
}
|
|
}
|