MCPcopy Create free account
hub / github.com/celer-pkg/celer / TestIntegrateCmd_CommandStructure

Function TestIntegrateCmd_CommandStructure

cmds/cmd_integrate_test.go:17–49  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

15)
16
17func TestIntegrateCmd_CommandStructure(t *testing.T) {
18 // Cleanup.
19 dirs.RemoveAllForTest()
20
21 // Test command creation.
22 integrate := &integrateCmd{}
23 celer := &configs.Celer{}
24
25 cmd := integrate.Command(celer)
26
27 if cmd.Use != "integrate" {
28 t.Errorf("Expected Use to be 'integrate', got %s", cmd.Use)
29 }
30
31 if cmd.Short == "" {
32 t.Error("Short description should not be empty")
33 }
34
35 if cmd.Long == "" {
36 t.Error("Long description should not be empty")
37 }
38
39 // Test flags
40 flag := cmd.Flags().Lookup("remove")
41 if flag == nil {
42 t.Error("--remove flag should be defined")
43 return
44 }
45
46 if flag.DefValue != "false" {
47 t.Errorf("Expected --remove default to be false, got %s", flag.DefValue)
48 }
49}
50
51func TestIntegrateCmd_Completion(t *testing.T) {
52 // Cleanup.

Callers

nothing calls this directly

Calls 3

CommandMethod · 0.95
RemoveAllForTestFunction · 0.92
ErrorMethod · 0.80

Tested by

no test coverage detected