Avoid returning nil, nil when fetching a manifest by tag by introducing a new
error ErrManifestNotModified which can be checked by clients. Signed-off-by: Richard Scothern <richard.scothern@gmail.com>
This commit is contained in:
parent
5a8fabfee3
commit
b8a1ec4155
3 changed files with 5 additions and 8 deletions
|
@ -603,13 +603,10 @@ func TestManifestFetchWithEtag(t *testing.T) {
|
|||
t.Fatal(err)
|
||||
}
|
||||
|
||||
m2, err := ms.GetByTag("latest", AddEtagToTag("latest", d1.String()))
|
||||
if err != nil {
|
||||
_, err = ms.GetByTag("latest", AddEtagToTag("latest", d1.String()))
|
||||
if err != distribution.ErrManifestNotModified {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if m2 != nil {
|
||||
t.Fatal("Expected empty manifest for matching etag")
|
||||
}
|
||||
}
|
||||
|
||||
func TestManifestDelete(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue