Skip to content

Commit ecf3af5

Browse files
committed
debug testing
Signed-off-by: apostasie <[email protected]>
1 parent 39f4cdc commit ecf3af5

File tree

3 files changed

+12
-24
lines changed

3 files changed

+12
-24
lines changed

cmd/nerdctl/image/image_prune_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ func TestImagePrune(t *testing.T) {
3939
// We need to delete everything here for prune to make any sense
4040
imgList := strings.TrimSpace(helpers.Capture("images", "--no-trunc", "-aq"))
4141
if imgList != "" {
42+
containers := helpers.Capture("ps", "-a")
43+
images := helpers.Capture("images", "-a")
44+
helpers.T().Log(images)
45+
helpers.T().Log(containers)
4246
helpers.Ensure(append([]string{"rmi", "-f"}, strings.Split(imgList, "\n")...)...)
4347
}
4448
}

pkg/containerutil/cp_resolve.go renamed to pkg/containerutil/cp_resolve_linux.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ import (
3131
"github.com/containerd/containerd/v2/pkg/oci"
3232
)
3333

34+
// volumeNameLen returns length of the leading volume name on Windows.
35+
// It returns 0 elsewhere.
36+
// FIXME: whenever we will want to port cp to windows, we will need the windows implementation of volumeNameLen
37+
func volumeNameLen(_ string) int {
38+
return 0
39+
}
40+
3441
var (
3542
errDoesNotExist = errors.New("resource does not exist") // when a path parent dir does not exist
3643
errIsNotADir = errors.New("is not a dir") // when a path is a file, ending with path separator
@@ -322,6 +329,7 @@ func (res *resolver) resolvePath(path string) (string, error) {
322329
// On Windows, "." can be a symlink.
323330
// We look it up, and use the value if it is absolute.
324331
// If not, we just return ".".
332+
//nolint:staticcheck
325333
isWindowsDot := runtime.GOOS == "windows" && path[volumeNameLen(path):] == "."
326334

327335
// The next path component is in path[start:end].

pkg/containerutil/cp_resolve_other.go

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)