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
27 lines
1.0 KiB
Go
27 lines
1.0 KiB
Go
package providerstatus
|
|
|
|
import "testing"
|
|
|
|
func TestCodexRemoteAuthEvidenceClassifiesProviderResult(t *testing.T) {
|
|
tests := []struct {
|
|
name string
|
|
success bool
|
|
failure string
|
|
wantKind AuthEvidenceKind
|
|
wantReason string
|
|
}{
|
|
{name: "accepted", success: true, wantKind: AuthEvidenceRemoteSuccess},
|
|
{name: "revoked prose is not evidence", failure: "401 Unauthorized: refresh token was revoked", wantKind: AuthEvidenceProbeFailure, wantReason: AuthReasonProbeFailed},
|
|
{name: "signed out prose is not evidence", failure: "authentication required", wantKind: AuthEvidenceProbeFailure, wantReason: AuthReasonProbeFailed},
|
|
{name: "transient", failure: "connection reset", wantKind: AuthEvidenceProbeFailure, wantReason: AuthReasonProbeFailed},
|
|
}
|
|
for _, test := range tests {
|
|
t.Run(test.name, func(t *testing.T) {
|
|
evidence := CodexRemoteAuthEvidence(test.success, test.failure)
|
|
if evidence.Kind != test.wantKind || evidence.Reason != test.wantReason {
|
|
t.Fatalf("evidence = %#v", evidence)
|
|
}
|
|
})
|
|
}
|
|
}
|