Skip to content

Commit

Permalink
Refactored test data generation; failing test for the case where a bl…
Browse files Browse the repository at this point in the history
…ob is used by more than one image

Signed-off-by: Philippe Vlérick <[email protected]>
  • Loading branch information
Pvlerick committed Jun 24, 2023
1 parent fff460e commit a731d94
Show file tree
Hide file tree
Showing 2 changed files with 240 additions and 145 deletions.
2 changes: 1 addition & 1 deletion oci/layout/oci_transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ func (ref ociReference) DeleteImage(ctx context.Context, sys *types.SystemContex
return err
}

indexJSON, err := os.OpenFile(ref.indexPath(), os.O_WRONLY, indexInfo.Mode())
indexJSON, err := os.OpenFile(ref.indexPath(), os.O_WRONLY|os.O_TRUNC, indexInfo.Mode())
if err != nil {
return err
}
Expand Down
Loading

0 comments on commit a731d94

Please sign in to comment.