MCPcopy
hub / github.com/puma/puma-dev / TestInstallIntoSystem_FailsAsSuperuser

Function TestInstallIntoSystem_FailsAsSuperuser

dev/setup_darwin_test.go:43–59  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

41}
42
43func TestInstallIntoSystem_FailsAsSuperuser(t *testing.T) {
44 os.Setenv("SUDO_USER", os.Getenv("USER"))
45 defer os.Unsetenv("SUDO_USER")
46
47 err := InstallIntoSystem(&InstallIntoSystemArgs{
48 ListenPort: 10080,
49 TlsPort: 10443,
50 Domains: "test:localhost",
51 Timeout: "5s",
52 NoServePublicPaths: "",
53 ApplinkDirPath: "/tmp/gotest-dummy-applinkdir",
54 LaunchAgentDirPath: "/tmp/gotest-dummy-launchagent",
55 LogfilePath: "/tmp/gotest-dummy-logs/dummy.log",
56 })
57
58 assert.Error(t, err)
59}
60
61func installIntoTestContext(t *testing.T) (string, string, func()) {
62 appLinkDir, _ := ioutil.TempDir("", ".puma-dev")

Callers

nothing calls this directly

Calls 1

InstallIntoSystemFunction · 0.85

Tested by

no test coverage detected