This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package agent_execution_test
|
||||
|
||||
import (
|
||||
"os"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestDispatchQueueMigrationDefinesClaimableDurableState(t *testing.T) {
|
||||
data, err := os.ReadFile("../../database/migrations/030_work_agent_dispatch_queue.sql")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
sql := string(data)
|
||||
for _, marker := range []string{"work.agent_dispatch_queue", "state IN ('QUEUED','CLAIMED','COMPLETED','FAILED')", "CREATE INDEX IF NOT EXISTS", "REFERENCES work.agent_dispatch_intents"} {
|
||||
if !strings.Contains(sql, marker) {
|
||||
t.Fatalf("queue contract marker missing: %s", marker)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user