Debian Codegraph @

t/purl/types/oci-test.json

raw
1 {
2 "$schema": "https://packageurl.org/schemas/purl-test.schema-0.1.json",
3 "tests": [
4 {
5 "description": "Parse test for PURL type: oci",
6 "test_group": "advanced",
7 "test_type": "parse",
8 "input": "pkg:oci/debian@sha256%3A244fd47e07d10?repository_url=docker.io/library/debian&arch=amd64&tag=latest",
9 "expected_output": {
10 "type": "oci",
11 "namespace": null,
12 "name": "debian",
13 "version": "sha256:244fd47e07d10",
14 "qualifiers": {
15 "arch": "amd64",
16 "repository_url": "docker.io/library/debian",
17 "tag": "latest"
18 },
19 "subpath": null
20 },
21 "expected_failure": false,
22 "expected_failure_reason": null
23 },
24 {
25 "description": "Roundtrip test for PURL type: oci",
26 "test_group": "advanced",
27 "test_type": "roundtrip",
28 "input": "pkg:oci/debian@sha256%3A244fd47e07d10?repository_url=docker.io/library/debian&arch=amd64&tag=latest",
29 "expected_output": "pkg:oci/debian@sha256:244fd47e07d10?arch=amd64&repository_url=docker.io%2Flibrary%2Fdebian&tag=latest",
30 "expected_failure": false,
31 "expected_failure_reason": null
32 },
33 {
34 "description": "Build test for PURL type: oci",
35 "test_group": "base",
36 "test_type": "build",
37 "input": {
38 "type": "oci",
39 "namespace": null,
40 "name": "debian",
41 "version": "sha256:244fd47e07d10",
42 "qualifiers": {
43 "arch": "amd64",
44 "repository_url": "docker.io/library/debian",
45 "tag": "latest"
46 },
47 "subpath": null
48 },
49 "expected_output": "pkg:oci/debian@sha256:244fd47e07d10?arch=amd64&repository_url=docker.io%2Flibrary%2Fdebian&tag=latest",
50 "expected_failure": false,
51 "expected_failure_reason": null
52 },
53 {
54 "description": "Parse test for PURL type: oci",
55 "test_group": "advanced",
56 "test_type": "parse",
57 "input": "pkg:oci/debian@sha256%3A244fd47e07d10?repository_url=ghcr.io/debian&tag=bullseye",
58 "expected_output": {
59 "type": "oci",
60 "namespace": null,
61 "name": "debian",
62 "version": "sha256:244fd47e07d10",
63 "qualifiers": {
64 "repository_url": "ghcr.io/debian",
65 "tag": "bullseye"
66 },
67 "subpath": null
68 },
69 "expected_failure": false,
70 "expected_failure_reason": null
71 },
72 {
73 "description": "Roundtrip test for PURL type: oci",
74 "test_group": "advanced",
75 "test_type": "roundtrip",
76 "input": "pkg:oci/debian@sha256%3A244fd47e07d10?repository_url=ghcr.io/debian&tag=bullseye",
77 "expected_output": "pkg:oci/debian@sha256:244fd47e07d10?repository_url=ghcr.io%2Fdebian&tag=bullseye",
78 "expected_failure": false,
79 "expected_failure_reason": null
80 },
81 {
82 "description": "Build test for PURL type: oci",
83 "test_group": "advanced",
84 "test_type": "build",
85 "input": {
86 "type": "oci",
87 "namespace": null,
88 "name": "debian",
89 "version": "sha256:244fd47e07d10",
90 "qualifiers": {
91 "repository_url": "ghcr.io/debian",
92 "tag": "bullseye"
93 },
94 "subpath": null
95 },
96 "expected_output": "pkg:oci/debian@sha256:244fd47e07d10?repository_url=ghcr.io%2Fdebian&tag=bullseye",
97 "expected_failure": false,
98 "expected_failure_reason": null
99 },
100 {
101 "description": "Parse test for PURL type: oci",
102 "test_group": "advanced",
103 "test_type": "parse",
104 "input": "pkg:oci/static@sha256%3A244fd47e07d10?repository_url=gcr.io/distroless/static&tag=latest",
105 "expected_output": {
106 "type": "oci",
107 "namespace": null,
108 "name": "static",
109 "version": "sha256:244fd47e07d10",
110 "qualifiers": {
111 "repository_url": "gcr.io/distroless/static",
112 "tag": "latest"
113 },
114 "subpath": null
115 },
116 "expected_failure": false,
117 "expected_failure_reason": null
118 },
119 {
120 "description": "Roundtrip test for PURL type: oci",
121 "test_group": "advanced",
122 "test_type": "roundtrip",
123 "input": "pkg:oci/static@sha256%3A244fd47e07d10?repository_url=gcr.io/distroless/static&tag=latest",
124 "expected_output": "pkg:oci/static@sha256:244fd47e07d10?repository_url=gcr.io%2Fdistroless%2Fstatic&tag=latest",
125 "expected_failure": false,
126 "expected_failure_reason": null
127 },
128 {
129 "description": "Build test for PURL type: oci",
130 "test_group": "base",
131 "test_type": "build",
132 "input": {
133 "type": "oci",
134 "namespace": null,
135 "name": "static",
136 "version": "sha256:244fd47e07d10",
137 "qualifiers": {
138 "repository_url": "gcr.io/distroless/static",
139 "tag": "latest"
140 },
141 "subpath": null
142 },
143 "expected_output": "pkg:oci/static@sha256:244fd47e07d10?repository_url=gcr.io%2Fdistroless%2Fstatic&tag=latest",
144 "expected_failure": false,
145 "expected_failure_reason": null
146 },
147 {
148 "description": "Parse test for PURL type: oci",
149 "test_group": "advanced",
150 "test_type": "parse",
151 "input": "pkg:oci/hello-wasm@sha256%3A244fd47e07d10?tag=v1",
152 "expected_output": {
153 "type": "oci",
154 "namespace": null,
155 "name": "hello-wasm",
156 "version": "sha256:244fd47e07d10",
157 "qualifiers": {
158 "tag": "v1"
159 },
160 "subpath": null
161 },
162 "expected_failure": false,
163 "expected_failure_reason": null
164 },
165 {
166 "description": "Roundtrip test for PURL type: oci",
167 "test_group": "advanced",
168 "test_type": "roundtrip",
169 "input": "pkg:oci/hello-wasm@sha256%3A244fd47e07d10?tag=v1",
170 "expected_output": "pkg:oci/hello-wasm@sha256:244fd47e07d10?tag=v1",
171 "expected_failure": false,
172 "expected_failure_reason": null
173 },
174 {
175 "description": "Build test for PURL type: oci",
176 "test_group": "base",
177 "test_type": "build",
178 "input": {
179 "type": "oci",
180 "namespace": null,
181 "name": "hello-wasm",
182 "version": "sha256:244fd47e07d10",
183 "qualifiers": {
184 "tag": "v1"
185 },
186 "subpath": null
187 },
188 "expected_output": "pkg:oci/hello-wasm@sha256:244fd47e07d10?tag=v1",
189 "expected_failure": false,
190 "expected_failure_reason": null
191 }
192 ]
193 }