17 lines
718 B
Go
17 lines
718 B
Go
package worker
|
|
|
|
import (
|
|
"droboticflow/internal/domain"
|
|
"testing"
|
|
)
|
|
|
|
func TestCaptureProgressPreservesActiveDirectories(t *testing.T) {
|
|
p, err := latestStructuredProgress(`DROBOTICFLOW_PROGRESS {"nodeId":"rectify","currentCaptureDirectories":["capture-a","capture-b"],"currentFile":"left.mp4","step":2,"updatedAt":"2026-09-07T00:00:01Z"}`)
|
|
if err != nil || p == nil || len(p.CurrentCaptureDirectories) != 2 || p.CurrentFile != "left.mp4" || p.NodeID != "rectify" {
|
|
t.Fatalf("lost capture progress: %#v %v", p, err)
|
|
}
|
|
if !progressAheadOf(p, &domain.RunProgress{NodeID: "previous", Step: 50, UpdatedAt: "2026-09-07T00:00:00Z"}) {
|
|
t.Fatal("new node progress must not be blocked by the previous node step")
|
|
}
|
|
}
|