|
90 | 90 | "expected_output": "pkg:apk/alpine/apk@2.12.9-r3?arch=x86", |
91 | 91 | "expected_failure": false, |
92 | 92 | "expected_failure_reason": null |
| 93 | + }, |
| 94 | + { |
| 95 | + "description": "Valid apk package with arch qualifier", |
| 96 | + "test_group": "base", |
| 97 | + "test_type": "validation", |
| 98 | + "input": { |
| 99 | + "type": "apk", |
| 100 | + "namespace": "alpine", |
| 101 | + "name": "curl", |
| 102 | + "version": "7.83.0-r0", |
| 103 | + "qualifiers": { |
| 104 | + "arch": "x86" |
| 105 | + }, |
| 106 | + "subpath": null |
| 107 | + }, |
| 108 | + "expected_messages": null |
| 109 | + }, |
| 110 | + { |
| 111 | + "description": "Valid apk package with higher version and arch qualifier", |
| 112 | + "test_group": "base", |
| 113 | + "test_type": "validation", |
| 114 | + "input": { |
| 115 | + "type": "apk", |
| 116 | + "namespace": "alpine", |
| 117 | + "name": "apk", |
| 118 | + "version": "2.12.9-r3", |
| 119 | + "qualifiers": { |
| 120 | + "arch": "x86" |
| 121 | + }, |
| 122 | + "subpath": null |
| 123 | + }, |
| 124 | + "expected_messages": null |
| 125 | + }, |
| 126 | + { |
| 127 | + "description": "Valid apk package with openwrt vendor", |
| 128 | + "test_group": "advanced", |
| 129 | + "test_type": "validation", |
| 130 | + "input": { |
| 131 | + "type": "apk", |
| 132 | + "namespace": "openwrt", |
| 133 | + "name": "busybox", |
| 134 | + "version": "1.35.0-r5", |
| 135 | + "qualifiers": { |
| 136 | + "arch": "mips" |
| 137 | + }, |
| 138 | + "subpath": null |
| 139 | + }, |
| 140 | + "expected_messages": null |
| 141 | + }, |
| 142 | + { |
| 143 | + "description": "apk package missing namespace", |
| 144 | + "test_group": "base", |
| 145 | + "test_type": "validation", |
| 146 | + "input": { |
| 147 | + "type": "apk", |
| 148 | + "namespace": null, |
| 149 | + "name": "curl", |
| 150 | + "version": "7.83.0-r0", |
| 151 | + "qualifiers": { |
| 152 | + "arch": "x86" |
| 153 | + }, |
| 154 | + "subpath": null |
| 155 | + }, |
| 156 | + "expected_messages": [ |
| 157 | + "Namespace is required for purl type: 'apk'" |
| 158 | + ] |
| 159 | + }, |
| 160 | + { |
| 161 | + "description": "apk package with uppercase namespace and name", |
| 162 | + "test_group": "base", |
| 163 | + "test_type": "validation", |
| 164 | + "input": { |
| 165 | + "type": "apk", |
| 166 | + "namespace": "FOO", |
| 167 | + "name": "BAR", |
| 168 | + "version": "7.83.0-r0", |
| 169 | + "qualifiers": { |
| 170 | + "arch": "x86" |
| 171 | + }, |
| 172 | + "subpath": null |
| 173 | + }, |
| 174 | + "expected_messages": [ |
| 175 | + "Namespace is not lowercased for purl type: 'apk'", |
| 176 | + "Name is not lowercased for purl type: 'apk'" |
| 177 | + ] |
| 178 | + }, |
| 179 | + { |
| 180 | + "description": "apk package with uppercase namespace and name (advanced)", |
| 181 | + "test_group": "advanced", |
| 182 | + "test_type": "validation", |
| 183 | + "input": { |
| 184 | + "type": "apk", |
| 185 | + "namespace": "FOO", |
| 186 | + "name": "BAR", |
| 187 | + "version": "7.83.0-r0", |
| 188 | + "qualifiers": { |
| 189 | + "arch": "x86" |
| 190 | + }, |
| 191 | + "subpath": null |
| 192 | + }, |
| 193 | + "expected_messages": null |
93 | 194 | } |
94 | 195 | ] |
95 | 196 | } |
0 commit comments