MCPcopy Create free account
hub / github.com/algolia/cli / Test_runPauseCmd_dryRunJSON

Function Test_runPauseCmd_dryRunJSON

pkg/cmd/crawler/pause/pause_test.go:65–75  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

63}
64
65func Test_runPauseCmd_dryRunJSON(t *testing.T) {
66 f, out := test.NewFactory(false, nil, nil, "")
67 cmd := NewPauseCmd(f, nil)
68
69 out, err := test.Execute(cmd, "crawler-1 crawler-2 --dry-run --output json", out)
70 require.NoError(t, err)
71
72 assert.Contains(t, out.String(), `"action":"pause_crawlers"`)
73 assert.Contains(t, out.String(), `"ids":["crawler-1","crawler-2"]`)
74 assert.Contains(t, out.String(), `"dryRun":true`)
75}

Callers

nothing calls this directly

Calls 4

NewFactoryFunction · 0.92
ExecuteFunction · 0.92
NewPauseCmdFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected