Skip to content

Commit

Permalink
conformance: skip check (by default) for zero layers in image manifest
Browse files Browse the repository at this point in the history
As per image-spec, since this is a SHOULD (hence recommended) and now
turned off by default.

https://raw.githubusercontent.com/opencontainers/image-spec/main/manifest.md
===

    layers array of objects

    Each item in the array MUST be a descriptor. For portability, layers
    SHOULD have at least one entry.

===

One can enable this test by setting env var:
OCI_SKIP_EMPTY_LAYER_PUSH_TEST=0

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
  • Loading branch information
rchincha committed May 31, 2023
1 parent f0ecc3a commit cf13c0b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions conformance/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ func init() {
runPushSetup = true
runContentDiscoverySetup = true
runContentManagementSetup = true
skipEmptyLayerTest = false
skipEmptyLayerTest = true
deleteManifestBeforeBlobs = false

if os.Getenv(envVarTagName) != "" &&
Expand All @@ -322,7 +322,9 @@ func init() {
runContentDiscoverySetup = false
}

skipEmptyLayerTest, _ = strconv.ParseBool(os.Getenv(envVarPushEmptyLayer))
if v, ok := os.LookupEnv(envVarPushEmptyLayer); ok {
skipEmptyLayerTest, _ = strconv.ParseBool(v)
}
deleteManifestBeforeBlobs, _ = strconv.ParseBool(os.Getenv(envVarDeleteManifestBeforeBlobs))
automaticCrossmountVal := ""
automaticCrossmountVal, runAutomaticCrossmountTest = os.LookupEnv(envVarAutomaticCrossmount)
Expand Down

0 comments on commit cf13c0b

Please sign in to comment.