Fix test, release notes
This commit is contained in:
		
							parent
							
								
									8ca08ce868
								
							
						
					
					
						commit
						f862341997
					
				
					 4 changed files with 14 additions and 6 deletions
				
			
		|  | @ -40,7 +40,6 @@ var flagsPublish = append( | |||
| 	&cli.BoolFlag{Name: "wait-cmd", Aliases: []string{"wait_cmd", "cmd", "done"}, EnvVars: []string{"NTFY_WAIT_CMD"}, Usage: "run command and wait until it finishes before publishing"}, | ||||
| 	&cli.BoolFlag{Name: "no-cache", Aliases: []string{"no_cache", "C"}, EnvVars: []string{"NTFY_NO_CACHE"}, Usage: "do not cache message server-side"}, | ||||
| 	&cli.BoolFlag{Name: "no-firebase", Aliases: []string{"no_firebase", "F"}, EnvVars: []string{"NTFY_NO_FIREBASE"}, Usage: "do not forward message to Firebase"}, | ||||
| 	&cli.BoolFlag{Name: "env-topic", Aliases: []string{"env_topic", "P"}, EnvVars: []string{"NTFY_ENV_TOPIC"}, Usage: "use topic from NTFY_TOPIC env variable"}, | ||||
| 	&cli.BoolFlag{Name: "quiet", Aliases: []string{"q"}, EnvVars: []string{"NTFY_QUIET"}, Usage: "do not print message"}, | ||||
| ) | ||||
| 
 | ||||
|  |  | |||
|  | @ -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) | ||||
| } | ||||
|  |  | |||
|  | @ -22,7 +22,6 @@ func init() { | |||
| } | ||||
| 
 | ||||
| func TestCLI_Serve_Unix_Curl(t *testing.T) { | ||||
| 	t.Parallel() | ||||
| 	sockFile := filepath.Join(t.TempDir(), "ntfy.sock") | ||||
| 	configFile := newEmptyFile(t) // Avoid issues with existing server.yml file on system | ||||
| 	go func() { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue