(t *testing.T)
| 41 | } |
| 42 | |
| 43 | func 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 | |
| 61 | func installIntoTestContext(t *testing.T) (string, string, func()) { |
| 62 | appLinkDir, _ := ioutil.TempDir("", ".puma-dev") |
nothing calls this directly
no test coverage detected