Fix listener tests
Signed-off-by: João Pereira <484633+joaodrp@users.noreply.github.com>
This commit is contained in:
parent
6ae6df7d75
commit
22053f57b0
1 changed files with 9 additions and 5 deletions
|
@ -199,11 +199,20 @@ func checkExerciseRepository(t *testing.T, repository distribution.Repository, r
|
|||
t.Fatalf("mismatching digest from payload and put")
|
||||
}
|
||||
|
||||
if err := repository.Tags(ctx).Tag(ctx, tag, distribution.Descriptor{Digest: dgst}); err != nil {
|
||||
t.Fatalf("unexpected error tagging manifest: %v", err)
|
||||
}
|
||||
|
||||
_, err = manifests.Get(ctx, dgst)
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected error fetching manifest: %v", err)
|
||||
}
|
||||
|
||||
err = repository.Tags(ctx).Untag(ctx, m.Tag)
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected error deleting tag: %v", err)
|
||||
}
|
||||
|
||||
err = manifests.Delete(ctx, dgst)
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected error deleting blob: %v", err)
|
||||
|
@ -216,11 +225,6 @@ func checkExerciseRepository(t *testing.T, repository distribution.Repository, r
|
|||
}
|
||||
}
|
||||
|
||||
err = repository.Tags(ctx).Untag(ctx, m.Tag)
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected error deleting tag: %v", err)
|
||||
}
|
||||
|
||||
err = remover.Remove(ctx, repository.Named())
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected error deleting repo: %v", err)
|
||||
|
|
Loading…
Reference in a new issue