mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-11-29 17:21:13 +01:00
Enable top-level t.Parallel() across 19 unclaimed scripts/installtests files (and subtest-level t.Parallel() on isolated subtest loops using per-subtest temp dirs and loopback servers), plus isolate the local configErr variable inside TestManualUpdateChannelAdmission's subtests so parallel subtests do not share the outer err variable under -race. No production code, installer scripts, assertions, or timeout budgets changed. Contract-Neutral: test-only parallelism in isolated scripts/installtests suites without production or contract changes Change-source: pulse-maintainer
27 lines
754 B
Go
27 lines
754 B
Go
package installtests
|
|
|
|
import (
|
|
"context"
|
|
"os"
|
|
"os/exec"
|
|
"runtime"
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
func TestRootInstallSystemdUnitPublication(t *testing.T) {
|
|
t.Parallel()
|
|
if runtime.GOOS == "windows" {
|
|
t.Skip("Unix installer and confined filesystem controls")
|
|
}
|
|
ctx, cancel := context.WithTimeout(context.Background(), 45*time.Second)
|
|
defer cancel()
|
|
cmd := exec.CommandContext(ctx, "python3", repoFile("scripts", "tests", "test_server_unit_publication.py"), "-v")
|
|
cmd.Env = append(os.Environ(), "PULSE_INSTALLER_UNDER_TEST="+repoFile("install.sh"))
|
|
out, err := cmd.CombinedOutput()
|
|
if err != nil {
|
|
t.Fatalf("complete server-unit publication and preservation controls: %v\n%s", err, out)
|
|
}
|
|
t.Logf("confined unit publication controls:\n%s", out)
|
|
}
|