Commit 458fe73
Martin Vrachev
new API: test containers for zero or more elements
Test metadata (de)serialization with input data containing containers
with zero or more elements.
Here is the status for the different use cases:
Root keys:
- many keys: added
Root roles:
- many roles: added
Root role keyids:
- many keids: already added in #1481
MetaFile hashes:
- many hashes: already tested
- zero hashes: added. Testing as invalid test case.
Delegation keys:
- many keys: added
Delegation role keyids:
- many keyids: added
Delegation role paths:
- many paths: already tested
Delegation role path_hash_prefixes:
- many path_hash_path_prefixes: already tested
According to the spec having an empty container for any of these cases:
- Root keys
- Root roles
- Root role keyids
- Delegation keys
- DelegationRole keyids
- DelegationRole paths
- DelegationRole path_hash_prefixes
is not allowed, but for the purpose of interactive object construction
we don't block those use-cases.
We don't want to add tests, because we don't want to
advertise this behavior.
In the future, we are going to add validation that those cases don't
occur which will be called when serializing the object back to
bytes/dictionary/file.
Signed-off-by: Martin Vrachev <mvrachev@vmware.com>1 parent 8e9677d commit 458fe73
1 file changed
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
171 | 189 | | |
172 | 190 | | |
173 | 191 | | |
| |||
184 | 202 | | |
185 | 203 | | |
186 | 204 | | |
| 205 | + | |
187 | 206 | | |
188 | 207 | | |
189 | 208 | | |
| |||
198 | 217 | | |
199 | 218 | | |
200 | 219 | | |
| 220 | + | |
201 | 221 | | |
202 | 222 | | |
203 | 223 | | |
| |||
246 | 266 | | |
247 | 267 | | |
248 | 268 | | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
249 | 272 | | |
250 | 273 | | |
251 | 274 | | |
| |||
262 | 285 | | |
263 | 286 | | |
264 | 287 | | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
265 | 293 | | |
266 | 294 | | |
267 | 295 | | |
| |||
0 commit comments