mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-11-29 17:21:13 +01:00
Check every unit write in the existing conditional callers, stage beside the destination, and require mode and atomic publication success. Preserve masks and redirected or non-regular destinations. Exercise old-unit preservation, all rendered phases and the real missing-unit update callers with confined failure fixtures. Contract-Neutral: Restores the existing complete-unit installation and failure-propagation contract without changing rendered settings, service authority, startup verification or release policy. Change-source: pulse-maintainer
26 lines
740 B
Go
26 lines
740 B
Go
package installtests
|
|
|
|
import (
|
|
"context"
|
|
"os"
|
|
"os/exec"
|
|
"runtime"
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
func TestRootInstallSystemdUnitPublication(t *testing.T) {
|
|
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)
|
|
}
|