Skip to content

Commit

Permalink
Remove new optimizeImageWithOpts usage after refactor
Browse files Browse the repository at this point in the history
Signed-off-by: Jin Dong <[email protected]>
  • Loading branch information
djdongjin committed Jan 18, 2023
1 parent 95d6e61 commit 235146b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fs/span-manager/span_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ func TestSpanManagerRetries(t *testing.T) {
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
entries := []testutil.TarEntry{
testutil.File("test", string(genRandomByteData(10000000))),
testutil.File("test", string(testutil.RandomByteData(10000000))),
}
ztoc, sr, err := ztoc.BuildZtocReader(entries, gzip.DefaultCompression, 100000)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions integration/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ log_fuse_operations = true
name: "image with valid ztocs and index doesn't cause fuse file.read failures",
image: rabbitmqImage,
indexDigestFn: func(t *testing.T, sh *shell.Shell, image imageInfo) string {
return optimizeImageWithOpts(sh, image, 1<<22, 0)
return buildSparseIndex(sh, image, 0, defaultSpanSize)
},
// even a valid index/ztoc produces some fuse operation failures such as
// node.lookup and node.getxattr failures, so we only check a specific fuse failure metric.
Expand All @@ -195,7 +195,7 @@ log_fuse_operations = true
name: "image with valid-formatted but invalid-data ztocs causes fuse file.read failures",
image: rabbitmqImage,
indexDigestFn: func(t *testing.T, sh *shell.Shell, image imageInfo) string {
indexDigest, err := buildIndexByManipulatingZtocData(sh, optimizeImageWithOpts(sh, image, 1<<22, 0), manipulateZtocMetadata)
indexDigest, err := buildIndexByManipulatingZtocData(sh, buildSparseIndex(sh, image, 0, defaultSpanSize), manipulateZtocMetadata)
if err != nil {
t.Fatal(err)
}
Expand Down

0 comments on commit 235146b

Please sign in to comment.