Skip to content

Commit aef0f61

Browse files
rchinchajdolitsky
andauthored
fix: delete manifest before blobs by default (#423)
* fix: delete manifest before blobs by default Currently the conformance tests default to deleting manifests after blobs, which leaves the manifest dangling. Furthermore, the same blob may be referenced in many manifests. AFAIK, no client does this. So changing default behavior. Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com> * Update conformance/README.md Signed-off-by: Josh Dolitsky <393494+jdolitsky@users.noreply.github.com> --------- Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com> Signed-off-by: Josh Dolitsky <393494+jdolitsky@users.noreply.github.com> Co-authored-by: Josh Dolitsky <393494+jdolitsky@users.noreply.github.com>
1 parent adeb3ac commit aef0f61

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

conformance/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export OCI_TEST_CONTENT_MANAGEMENT=1
3131
# Extra settings
3232
export OCI_HIDE_SKIPPED_WORKFLOWS=0
3333
export OCI_DEBUG=0
34-
export OCI_DELETE_MANIFEST_BEFORE_BLOBS=0
34+
export OCI_DELETE_MANIFEST_BEFORE_BLOBS=0 # defaults to OCI_DELETE_MANIFEST_BEFORE_BLOBS=1 if not set
3535
```
3636

3737
Lastly, run the tests:

conformance/setup.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ func init() {
310310
runContentDiscoverySetup = true
311311
runContentManagementSetup = true
312312
skipEmptyLayerTest = false
313-
deleteManifestBeforeBlobs = false
313+
deleteManifestBeforeBlobs = true
314314

315315
if os.Getenv(envVarTagName) != "" &&
316316
os.Getenv(envVarManifestDigest) != "" &&
@@ -323,7 +323,9 @@ func init() {
323323
}
324324

325325
skipEmptyLayerTest, _ = strconv.ParseBool(os.Getenv(envVarPushEmptyLayer))
326-
deleteManifestBeforeBlobs, _ = strconv.ParseBool(os.Getenv(envVarDeleteManifestBeforeBlobs))
326+
if v, ok := os.LookupEnv(envVarDeleteManifestBeforeBlobs); ok {
327+
deleteManifestBeforeBlobs, _ = strconv.ParseBool(v)
328+
}
327329
automaticCrossmountVal := ""
328330
automaticCrossmountVal, runAutomaticCrossmountTest = os.LookupEnv(envVarAutomaticCrossmount)
329331
automaticCrossmountEnabled, _ = strconv.ParseBool(automaticCrossmountVal)

0 commit comments

Comments
 (0)