Skip to content

Commit

Permalink
debug testing
Browse files Browse the repository at this point in the history
Signed-off-by: apostasie <[email protected]>
  • Loading branch information
apostasie committed Dec 4, 2024
1 parent 39f4cdc commit ecf3af5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 24 deletions.
4 changes: 4 additions & 0 deletions cmd/nerdctl/image/image_prune_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ func TestImagePrune(t *testing.T) {
// We need to delete everything here for prune to make any sense
imgList := strings.TrimSpace(helpers.Capture("images", "--no-trunc", "-aq"))
if imgList != "" {
containers := helpers.Capture("ps", "-a")
images := helpers.Capture("images", "-a")
helpers.T().Log(images)
helpers.T().Log(containers)
helpers.Ensure(append([]string{"rmi", "-f"}, strings.Split(imgList, "\n")...)...)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ import (
"github.com/containerd/containerd/v2/pkg/oci"
)

// volumeNameLen returns length of the leading volume name on Windows.
// It returns 0 elsewhere.
// FIXME: whenever we will want to port cp to windows, we will need the windows implementation of volumeNameLen
func volumeNameLen(_ string) int {
return 0
}

var (
errDoesNotExist = errors.New("resource does not exist") // when a path parent dir does not exist
errIsNotADir = errors.New("is not a dir") // when a path is a file, ending with path separator
Expand Down Expand Up @@ -322,6 +329,7 @@ func (res *resolver) resolvePath(path string) (string, error) {
// On Windows, "." can be a symlink.
// We look it up, and use the value if it is absolute.
// If not, we just return ".".
//nolint:staticcheck
isWindowsDot := runtime.GOOS == "windows" && path[volumeNameLen(path):] == "."

// The next path component is in path[start:end].
Expand Down
24 changes: 0 additions & 24 deletions pkg/containerutil/cp_resolve_other.go

This file was deleted.

0 comments on commit ecf3af5

Please sign in to comment.