diff --git a/notifications/listener_test.go b/notifications/listener_test.go index 74439668..e34707d7 100644 --- a/notifications/listener_test.go +++ b/notifications/listener_test.go @@ -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)