|
|
@@ -86,7 +86,6 @@ func TestCLI_Publish_All_The_Things(t *testing.T) {
|
|
|
}
|
|
|
|
|
|
func TestCLI_Publish_Wait_PID_And_Cmd(t *testing.T) {
|
|
|
- t.Parallel()
|
|
|
s, port := test.StartServer(t)
|
|
|
defer test.StopServer(t, s, port)
|
|
|
topic := fmt.Sprintf("http://127.0.0.1:%d/mytopic", port)
|
|
|
@@ -135,7 +134,7 @@ func TestCLI_Publish_Wait_PID_And_Cmd(t *testing.T) {
|
|
|
|
|
|
// Test: Successful command with NTFY_TOPIC
|
|
|
app, _, stdout, _ = newTestApp()
|
|
|
- require.Nil(t, app.Run([]string{"ntfy", "publish", "--env-topic", "--cmd", "echo", "hi there"}))
|
|
|
+ require.Nil(t, app.Run([]string{"ntfy", "publish", "--cmd", "echo", "hi there"}))
|
|
|
m = toMessage(t, stdout.String())
|
|
|
require.Equal(t, "mytopic", m.Topic)
|
|
|
|
|
|
@@ -144,7 +143,7 @@ func TestCLI_Publish_Wait_PID_And_Cmd(t *testing.T) {
|
|
|
require.Nil(t, sleep.Start())
|
|
|
go sleep.Wait() // Must be called to release resources
|
|
|
app, _, stdout, _ = newTestApp()
|
|
|
- require.Nil(t, app.Run([]string{"ntfy", "publish", "--env-topic", "--wait-pid", strconv.Itoa(sleep.Process.Pid)}))
|
|
|
+ require.Nil(t, app.Run([]string{"ntfy", "publish", "--wait-pid", strconv.Itoa(sleep.Process.Pid)}))
|
|
|
m = toMessage(t, stdout.String())
|
|
|
require.Regexp(t, `Process with PID \d+ exited after .+ms`, m.Message)
|
|
|
}
|