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

Function TestRemoveCmd_Execute_ValidationError

cmds/cmd_remove_test.go:454–471  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

452}
453
454func TestRemoveCmd_Execute_ValidationError(t *testing.T) {
455 // Cleanup.
456 dirs.RemoveAllForTest()
457
458 remove := &removeCmd{
459 celer: &configs.Celer{},
460 }
461
462 // Test with invalid package name.
463 err := remove.execute([]string{"invalid-package"})
464 if err == nil {
465 t.Error("Expected error for invalid package name, got nil")
466 }
467
468 if !strings.Contains(err.Error(), "invalid package names") {
469 t.Errorf("Expected validation error, got: %v", err)
470 }
471}
472
473func TestRemoveCmd_Default(t *testing.T) {
474 installedPort := installForTestRemove(t, "glog@0.6.0", configs.RemoveOptions{})

Callers

nothing calls this directly

Calls 3

executeMethod · 0.95
RemoveAllForTestFunction · 0.92
ErrorMethod · 0.80

Tested by

no test coverage detected