package main import ( "context" "testing" "time" "git.novox.be/novox/mesh-sdk/go/buildstep" "git.novox.be/novox/mesh-sdk/go/buildstep/conformance" "git.novox.be/novox/mesh-sdk/go/forgekey" ) // 1901/AC7: the module's own parse path (testFailures, as the test step calls it on a command that failed) keeps the // failure contract on every captured node --test and tsc case of the SDK's conformance kit. func TestTheTestStepKeepsTheFailureContract(t *testing.T) { conformance.Run(t, conformance.NodeTest, func(o conformance.Output) []buildstep.Failure { return testFailures(".", "test", o.Dir, forgekey.Ran{Status: 1, Stdout: o.Stdout, Stderr: o.Stderr}, o.Report) }) conformance.Run(t, conformance.TypeCheck, func(o conformance.Output) []buildstep.Failure { return testFailures(".", "type-check", o.Dir, forgekey.Ran{Status: 2, Stdout: o.Stdout, Stderr: o.Stderr}, "") }) } // 1890/AC7: the module's own start sweep (endLeftRunning, as main runs it) keeps the conformance kit's left-running // case: a step a previous process left running is ended at once and said, whatever its age, and a step of this process // is kept. func TestTheStartSweepEndsWhatAPreviousProcessLeft(t *testing.T) { conformance.LeftRunning(t, func(ctx context.Context, scan buildstep.Scan, node string, before time.Time, logf func(string, ...any)) { (&Module{Node: node}).endLeftRunning(ctx, scan, before, logf) }) }