test(sync): consolidate all sync tests (#1332)

Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
This commit is contained in:
peusebiu
2023-04-07 09:36:27 +03:00
committed by GitHub
parent 38997be596
commit 96232bb11c
3 changed files with 462 additions and 56 deletions
+5
View File
@@ -682,6 +682,9 @@ func syncImageWithRefs(ctx context.Context, localRepo, upstreamRepo, reference s
if mediaType == ispec.MediaTypeArtifactManifest {
err = sig.syncOCIArtifact(localRepo, upstreamRepo, reference, manifestBuf) //nolint
if err != nil {
log.Error().Err(err).Msgf("couldn't sync oci artifact with artifact mediaType: %s",
upstreamImageRef.DockerReference())
return skipped, err
}
}
@@ -786,5 +789,7 @@ func syncImageWithRefs(ctx context.Context, localRepo, upstreamRepo, reference s
return skipped, err
}
log.Info().Msgf("successfully synced image %s", upstreamImageRef.DockerReference())
return skipped, nil
}