mirror of
https://github.com/containers/podman.git
synced 2025-09-27 16:54:42 +08:00
Add --accept-repositories
integration tests
This adds the integration tests for the repository or namespaced registry feature introduced in c/common. Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
This commit is contained in:
12
vendor/github.com/containers/common/libimage/copier.go
generated
vendored
12
vendor/github.com/containers/common/libimage/copier.go
generated
vendored
@ -342,7 +342,7 @@ func (c *copier) copy(ctx context.Context, source, destination types.ImageRefere
|
||||
}
|
||||
}
|
||||
|
||||
var copiedManifest []byte
|
||||
var returnManifest []byte
|
||||
f := func() error {
|
||||
opts := c.imageCopyOptions
|
||||
if sourceInsecure != nil {
|
||||
@ -354,11 +354,13 @@ func (c *copier) copy(ctx context.Context, source, destination types.ImageRefere
|
||||
opts.DestinationCtx.DockerInsecureSkipTLSVerify = value
|
||||
}
|
||||
|
||||
var err error
|
||||
copiedManifest, err = copy.Image(ctx, c.policyContext, destination, source, &opts)
|
||||
copiedManifest, err := copy.Image(ctx, c.policyContext, destination, source, &opts)
|
||||
if err == nil {
|
||||
returnManifest = copiedManifest
|
||||
}
|
||||
return err
|
||||
}
|
||||
return copiedManifest, retry.RetryIfNecessary(ctx, f, &c.retryOptions)
|
||||
return returnManifest, retry.RetryIfNecessary(ctx, f, &c.retryOptions)
|
||||
}
|
||||
|
||||
// checkRegistrySourcesAllows checks the $BUILD_REGISTRY_SOURCES environment
|
||||
@ -369,7 +371,7 @@ func (c *copier) copy(ctx context.Context, source, destination types.ImageRefere
|
||||
// If set, the insecure return value indicates whether the registry is set to
|
||||
// be insecure.
|
||||
//
|
||||
// NOTE: this functionality is required by Buildah.
|
||||
// NOTE: this functionality is required by Buildah for OpenShift.
|
||||
func checkRegistrySourcesAllows(dest types.ImageReference) (insecure *bool, err error) {
|
||||
registrySources, ok := os.LookupEnv("BUILD_REGISTRY_SOURCES")
|
||||
if !ok || registrySources == "" {
|
||||
|
Reference in New Issue
Block a user