Add t.Parallel() to all 45 top-level test functions in cmd/bd/protocol. Each test already creates a fully isolated workspace (unique Dolt prefix, temp dir, git repo) so parallelization is safe. Reduces test time from ~135s to ~42s on the same machine. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Executed-By: beads/polecats/quartz Rig: beads Role: polecats
20 lines
558 B
Go
20 lines
558 B
Go
package protocol
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
// TestProtocol_DeferPastDateWarns asserts that bd defer --until with a past
|
|
// date warns the user. The bd update --defer path already warns; bd defer
|
|
// should be consistent.
|
|
func TestProtocol_DeferPastDateWarns(t *testing.T) {
|
|
t.Parallel()
|
|
w := newWorkspace(t)
|
|
id := w.create("--title", "Defer target", "--type", "task")
|
|
|
|
out, _ := w.tryRun("defer", id, "--until=2020-01-01")
|
|
if !strings.Contains(out, "past") {
|
|
t.Errorf("bd defer --until=<past date> should warn about past date:\n%s", out)
|
|
}
|
|
}
|