- Batch integration upserts in a single transaction - Treat radarr/sonarr lookup results as arrays and require exact matches - Prefer queue failures over downloading state when evaluating arr queues - Allow retrying queued/downloading requests and block declines once fulfillment started - Fall back to pending when auto-approval integration check fails - Rename requests query hooks file and fix discover card request affordance
21 lines
619 B
Go
21 lines
619 B
Go
package arrclient
|
|
|
|
import "testing"
|
|
|
|
func TestEvaluateQueueFailureWinsOverDownloading(t *testing.T) {
|
|
result := EvaluateQueue([]QueueResource{
|
|
{Status: "downloading", TrackedDownloadState: "downloading"},
|
|
{Title: "Bad Release", Status: "queued", TrackedDownloadState: "failedPending"},
|
|
})
|
|
|
|
if result.State != QueueStateFailed {
|
|
t.Fatalf("state = %q, want failed", result.State)
|
|
}
|
|
if result.ExternalStatus != "queued/failedPending" {
|
|
t.Fatalf("external status = %q, want queued/failedPending", result.ExternalStatus)
|
|
}
|
|
if result.Message == "" {
|
|
t.Fatal("message should describe the queue failure")
|
|
}
|
|
}
|