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

Function TestRemoveCmd_Purge

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

Source from the content-addressed store, hash-verified

495}
496
497func TestRemoveCmd_Purge(t *testing.T) {
498 installedPort := installForTestRemove(t, "glog@0.6.0", configs.RemoveOptions{
499 Purge: true,
500 })
501
502 // Check if still installed.
503 if installed, err := installedPort.Installed(); err != nil {
504 t.Fatalf("failed to check installation status of glog@0.6.0: %v", err)
505 } else if installed {
506 t.Fatal("glog@0.6.0 should have been removed")
507 }
508
509 // Check if package files are removed.
510 if fileio.PathExists(installedPort.PackageDir) {
511 t.Fatalf("package files for glog@0.6.0 should have been purged")
512 }
513}
514
515func TestRemoveCmd_Recursive(t *testing.T) {
516 installedPort := installForTestRemove(t, "glog@0.6.0", configs.RemoveOptions{

Callers

nothing calls this directly

Calls 3

PathExistsFunction · 0.92
installForTestRemoveFunction · 0.85
InstalledMethod · 0.80

Tested by

no test coverage detected