(t *testing.T)
| 27 | } |
| 28 | |
| 29 | func TestUninstall_DarwinInteractive(t *testing.T) { |
| 30 | if m := flag.Lookup("test.run").Value.String(); m == "" || !regexp.MustCompile(m).MatchString(t.Name()) { |
| 31 | t.Skip("interactive test must be specified with -test.run=DarwinInteractive") |
| 32 | } |
| 33 | launchAgentDir, _, cleanupFunc := installIntoTestContext(t) |
| 34 | defer cleanupFunc() |
| 35 | |
| 36 | assert.NoError(t, exec.Command("launchctl", "list", "io.puma.dev").Run()) |
| 37 | |
| 38 | Uninstall(launchAgentDir, []string{"test", "localhost"}) |
| 39 | |
| 40 | assert.Error(t, exec.Command("launchctl", "list", "io.puma.dev").Run()) |
| 41 | } |
| 42 | |
| 43 | func TestInstallIntoSystem_FailsAsSuperuser(t *testing.T) { |
| 44 | os.Setenv("SUDO_USER", os.Getenv("USER")) |
nothing calls this directly
no test coverage detected