Improve error messages and remove check
* Improve error messages
* remove a check for the existance of unmount target. We probably
should not mask that the target was missing.
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
@@ -96,7 +96,7 @@ func checkRemoveDirectoryInLowerLayer(ctx context.Context, t *testing.T, sn snap
|
||||
// see https://github.com/docker/docker/issues/28391 overlay2
|
||||
func checkChown(ctx context.Context, t *testing.T, sn snapshots.Snapshotter, work string) {
|
||||
if runtime.GOOS == "windows" {
|
||||
t.Skip("Chown is not supported on WCOW")
|
||||
t.Skip("Chown is not supported on Windows")
|
||||
}
|
||||
l1Init := fstest.Apply(
|
||||
fstest.CreateDir("/opt", 0700),
|
||||
|
||||
@@ -877,7 +877,7 @@ func closeTwice(ctx context.Context, t *testing.T, snapshotter snapshots.Snapsho
|
||||
|
||||
func checkRootPermission(ctx context.Context, t *testing.T, snapshotter snapshots.Snapshotter, work string) {
|
||||
if runtime.GOOS == "windows" {
|
||||
t.Skip("Filesystem permissions are not supported on WCOW")
|
||||
t.Skip("Filesystem permissions are not supported on Windows")
|
||||
}
|
||||
|
||||
preparing, err := snapshotterPrepareMount(ctx, snapshotter, "preparing", "", work)
|
||||
|
||||
@@ -356,7 +356,7 @@ func (s *snapshotter) createSnapshot(ctx context.Context, kind snapshots.Kind, k
|
||||
// Create the new snapshot dir
|
||||
snDir := s.getSnapshotDir(newSnapshot.ID)
|
||||
if err = os.MkdirAll(snDir, 0700); err != nil {
|
||||
return fmt.Errorf("creating snapshot dir: %w", err)
|
||||
return fmt.Errorf("failed to create snapshot dir %s: %w", snDir, err)
|
||||
}
|
||||
|
||||
if strings.Contains(key, snapshots.UnpackKeyPrefix) {
|
||||
|
||||
Reference in New Issue
Block a user