Skip to content

Commit

Permalink
Add and fix test
Browse files Browse the repository at this point in the history
Signed-off-by: Natalie Arellano <narellano@vmware.com>
  • Loading branch information
natalieparellano committed Apr 12, 2024
1 parent 77134a1 commit db66ae4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions local/local_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1584,11 +1584,9 @@ func testImage(t *testing.T, when spec.G, it spec.S) {
h.AssertNil(t, err)
h.AssertNil(t, err)
_, err = img.GetLayer(someSHA)
h.AssertError(
t,
err,
fmt.Sprintf(`image %q does not contain layer with diff ID "%s"`, repoName, someSHA),
)
h.AssertError(t, err, fmt.Sprintf("failed to find layer with diff ID %q", someSHA))
_, ok := err.(imgutil.ErrLayerNotFound)
h.AssertEq(t, ok, true)
})
})
})
Expand All @@ -1600,7 +1598,9 @@ func testImage(t *testing.T, when spec.G, it spec.S) {

readCloser, err := image.GetLayer(someSHA)
h.AssertNil(t, readCloser)
h.AssertError(t, err, fmt.Sprintf("image %q does not contain layer with diff ID %q", "not-exist", someSHA))
h.AssertError(t, err, fmt.Sprintf("failed to find layer with diff ID %q", someSHA))
_, ok := err.(imgutil.ErrLayerNotFound)
h.AssertEq(t, ok, true)
})
})
})
Expand Down

0 comments on commit db66ae4

Please sign in to comment.