From 4b44af0f4898c480069843f4b5095924675827e4 Mon Sep 17 00:00:00 2001 From: Billy Zha Date: Fri, 1 Sep 2023 06:52:06 +0000 Subject: [PATCH 1/3] test(e2e): add doc for ZOT test data Signed-off-by: Billy Zha --- test/e2e/README.md | 50 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 45 insertions(+), 5 deletions(-) diff --git a/test/e2e/README.md b/test/e2e/README.md index 8ab639028..cd54e9f2a 100644 --- a/test/e2e/README.md +++ b/test/e2e/README.md @@ -113,8 +113,8 @@ graph TD; E1["test.sbom.file(artifact)"] -- subject --> C1 E2["test.signature.file(artifact)"] -- subject --> E1 direction TB - D1["test.sbom.file(image)"] -- subject --> C1 - D2["test.signature.file(image)"] -- subject --> D1 + D1["test/sbom.file(image)"] -- subject --> C1 + D2["test/signature.file(image)"] -- subject --> D1 end subgraph "file: artifacts_index.tar.gz" direction TB @@ -139,14 +139,54 @@ graph TD; A1-- foo2 -->A2(blob1) A1-- bar -->A3(blob2) - E1["test.sbom.file(image)"] -- subject --> A1 - E2["test.signature.file(image)"] -- subject --> E1 + E1["test/sbom.file(image)"] -- subject --> A1 + E2["test/signature.file(image)"] -- subject --> E1 end end ``` ##### Test Data for ZOT -Still WIP. Currently test data is partial, will update this section after all the specs in command suite are migrated to ZOT. +```mermaid +graph TD; + subgraph "repository: command/images" + subgraph "file: images.tar.gz" + direction TB + A0>tag: multi]-..->A1[oci index] + A1--linux/amd64-->A2[oci image] + A1--linux/arm64-->A3[oci image] + A1--linux/arm/v7-->A4[oci image] + A2-->A5(config1) + A3-->A6(config2) + A4-->A7(config3) + A2-- hello.tar -->A8(blob) + A3-- hello.tar -->A8(blob) + A4-- hello.tar -->A8(blob) + + B0>tag: foobar]-..->B1[oci image] + B1-- foo1 -->B2(blob1) + B1-- foo2 -->B2(blob1) + B1-- bar -->B3(blob2) + end + end + + subgraph "repository: command/artifacts" + direction TB + C0>tag: foobar]-..->C1[oci image] + + direction TB + direction TB + D1["test.sbom.file(image)"] -- subject --> C1 + D2["test.signature.file(image)"] -- subject --> D1 + direction TB + F0>tag: multi]-..->F1[oci index] + F1--linux/amd64-->F2[oci image] + F1--linux/arm64-->F3[oci image] + F1--linux/arm/v7-->F4[oci image] + G1["referrer.index(image)"] -- subject --> F1 + G2["referrer.image(image)"] -- subject --> F2 + G3["index"] -- subject --> F1 + end +``` #### 9.2 Scenario Suite Test files used by scenario-based specs are placed in `$REPO_ROOT/test/e2e/testdata/files`. \ No newline at end of file From 5e5c301e0587c65d66cf628f34339cb9171c53e3 Mon Sep 17 00:00:00 2001 From: Billy Zha Date: Fri, 1 Sep 2023 06:54:14 +0000 Subject: [PATCH 2/3] doc clean Signed-off-by: Billy Zha --- test/e2e/README.md | 64 ++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 33 deletions(-) diff --git a/test/e2e/README.md b/test/e2e/README.md index cd54e9f2a..43f1bdb97 100644 --- a/test/e2e/README.md +++ b/test/e2e/README.md @@ -149,42 +149,40 @@ graph TD; ```mermaid graph TD; subgraph "repository: command/images" - subgraph "file: images.tar.gz" - direction TB - A0>tag: multi]-..->A1[oci index] - A1--linux/amd64-->A2[oci image] - A1--linux/arm64-->A3[oci image] - A1--linux/arm/v7-->A4[oci image] - A2-->A5(config1) - A3-->A6(config2) - A4-->A7(config3) - A2-- hello.tar -->A8(blob) - A3-- hello.tar -->A8(blob) - A4-- hello.tar -->A8(blob) - - B0>tag: foobar]-..->B1[oci image] - B1-- foo1 -->B2(blob1) - B1-- foo2 -->B2(blob1) - B1-- bar -->B3(blob2) - end + direction TB + A0>tag: multi]-..->A1[oci index] + A1--linux/amd64-->A2[oci image] + A1--linux/arm64-->A3[oci image] + A1--linux/arm/v7-->A4[oci image] + A2-->A5(config1) + A3-->A6(config2) + A4-->A7(config3) + A2-- hello.tar -->A8(blob) + A3-- hello.tar -->A8(blob) + A4-- hello.tar -->A8(blob) + + B0>tag: foobar]-..->B1[oci image] + B1-- foo1 -->B2(blob1) + B1-- foo2 -->B2(blob1) + B1-- bar -->B3(blob2) end subgraph "repository: command/artifacts" - direction TB - C0>tag: foobar]-..->C1[oci image] - - direction TB - direction TB - D1["test.sbom.file(image)"] -- subject --> C1 - D2["test.signature.file(image)"] -- subject --> D1 - direction TB - F0>tag: multi]-..->F1[oci index] - F1--linux/amd64-->F2[oci image] - F1--linux/arm64-->F3[oci image] - F1--linux/arm/v7-->F4[oci image] - G1["referrer.index(image)"] -- subject --> F1 - G2["referrer.image(image)"] -- subject --> F2 - G3["index"] -- subject --> F1 + direction TB + C0>tag: foobar]-..->C1[oci image] + + direction TB + direction TB + D1["test.sbom.file(image)"] -- subject --> C1 + D2["test.signature.file(image)"] -- subject --> D1 + direction TB + F0>tag: multi]-..->F1[oci index] + F1--linux/amd64-->F2[oci image] + F1--linux/arm64-->F3[oci image] + F1--linux/arm/v7-->F4[oci image] + G1["referrer.index(image)"] -- subject --> F1 + G2["referrer.image(image)"] -- subject --> F2 + G3["index"] -- subject --> F1 end ``` From 4e2a8e068a016e54fa7d8a9a83c5f35c5085012c Mon Sep 17 00:00:00 2001 From: Billy Zha Date: Fri, 1 Sep 2023 07:23:18 +0000 Subject: [PATCH 3/3] resolve comment Signed-off-by: Billy Zha --- test/e2e/README.md | 90 ++++++++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 42 deletions(-) diff --git a/test/e2e/README.md b/test/e2e/README.md index 43f1bdb97..2bd607f2c 100644 --- a/test/e2e/README.md +++ b/test/e2e/README.md @@ -83,49 +83,52 @@ Command suite uses two kinds of pre-baked test data: ##### Test Data for ORAS-Distribution ```mermaid graph TD; - subgraph "repository: command/images" - subgraph "file: images.tar.gz" - direction TB - A0>tag: multi]-..->A1[oci index] - A1--linux/amd64-->A2[oci image] - A1--linux/arm64-->A3[oci image] - A1--linux/arm/v7-->A4[oci image] - A2-->A5(config1) - A3-->A6(config2) - A4-->A7(config3) - A2-- hello.tar -->A8(blob) - A3-- hello.tar -->A8(blob) - A4-- hello.tar -->A8(blob) - - B0>tag: foobar]-..->B1[oci image] - B1-- foo1 -->B2(blob1) - B1-- foo2 -->B2(blob1) - B1-- bar -->B3(blob2) - end +subgraph "repository: command/images" + subgraph "file: images.tar.gz" + direction TB + A0>tag: multi]-..->A1[oci index] + A1--linux/amd64-->A2[oci image] + A1--linux/arm64-->A3[oci image] + A1--linux/arm/v7-->A4[oci image] + A2-->A5(config1) + A3-->A6(config2) + A4-->A7(config3) + A2-- hello.tar -->A8(blob) + A3-- hello.tar -->A8(blob) + A4-- hello.tar -->A8(blob) + + B0>tag: foobar]-..->B1[oci image] + B1-- foo1 -->B2(blob1) + B1-- foo2 -->B2(blob1) + B1-- bar -->B3(blob2) end - - subgraph "repository: command/artifacts" - subgraph "file: artifacts.tar.gz" - direction TB - C0>tag: foobar]-..->C1[oci image] - - direction TB - E1["test.sbom.file(artifact)"] -- subject --> C1 - E2["test.signature.file(artifact)"] -- subject --> E1 - direction TB - D1["test/sbom.file(image)"] -- subject --> C1 - D2["test/signature.file(image)"] -- subject --> D1 - end - subgraph "file: artifacts_index.tar.gz" - direction TB - F0>tag: multi]-..->F1[oci index] - F1--linux/amd64-->F2[oci image] - F1--linux/arm64-->F3[oci image] - F1--linux/arm/v7-->F4[oci image] - G1["referrer.index(image)"] -- subject --> F1 - G2["referrer.image(image)"] -- subject --> F2 - end +end +``` + +```mermaid +graph TD; +subgraph "repository: command/artifacts" + subgraph "file: artifacts.tar.gz" + direction TB + C0>tag: foobar]-..->C1[oci image] + + direction TB + E1["test.sbom.file(artifact)"] -- subject --> C1 + E2["test.signature.file(artifact)"] -- subject --> E1 + direction TB + D1["test/sbom.file(image)"] -- subject --> C1 + D2["test/signature.file(image)"] -- subject --> D1 end + subgraph "file: artifacts_index.tar.gz" + direction TB + F0>tag: multi]-..->F1[oci index] + F1--linux/amd64-->F2[oci image] + F1--linux/arm64-->F3[oci image] + F1--linux/arm/v7-->F4[oci image] + G1["referrer.index(image)"] -- subject --> F1 + G2["referrer.image(image)"] -- subject --> F2 + end +end ``` ##### Test Data for Upstream Distribution @@ -166,7 +169,10 @@ graph TD; B1-- foo2 -->B2(blob1) B1-- bar -->B3(blob2) end - +``` + +```mermaid +graph TD; subgraph "repository: command/artifacts" direction TB C0>tag: foobar]-..->C1[oci image]