Replies: 5 comments 4 replies
-
|
@vaninrao10 @priteshbandi Please help to review it. |
Beta Was this translation helpful? Give feedback.
-
|
@JeyJeyGao Very good summary.
|
Beta Was this translation helpful? Give feedback.
-
Just clarify the "multi-registry" consideration of E2E testing, Notary is being resigned to support multi-registry registry natively, so it would be portable and convenient that design the "registry" as a variable that we can easily replace it with others. It will be easy to test the Notation conformance with other registries not only the default Zot registry. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks @JeyJeyGao Overall, it is a good e2e testing plan. I don't have any comments now. |
Beta Was this translation helpful? Give feedback.
-
Do we know what's required to achieve this? We can surely start with sequential and then move to parallel but we should write tests in such a way that it should take minimum effort to parallelize them
nit: We can sign once and then use verify multiple times
Can you please list this testcases? I can think of more than 10 scenarios. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What is Needed
End-to-end (E2E) tests that continuously validate the functional correctness of notation features.
Why It's Needed
As the number of supported commands grows, it's impossible to manually validate all the features before releasing them.
Although we have unit tests for CLI, things might still go wrong after integration. Having E2E tests would at least cover high-value use cases and reduce regression.
Requirement
For testing framework:
For test cases:
signandverifycommands and flags combinations (P0)verifycommands with different trustpolicy.json files, including a variety of arguments combinations (P0)signandverifywith a plugin (P2)Details
E2E Testing Framework
Basic Framwork
ORAS E2E testing is a good example for us. Both the notation and oras need a local registry for the E2E test. However, there are some differences:
We have choices to solve those two issues.
Everything else can follow oras E2E test design.
My idea is to do a sequential test for now because we only have about 50 test cases, which should be done in a few minutes. If we have too many test cases in the future, then we can optimize it to run in parallel.
Registry
We can use Zot registry to do the notation testing because it supports OCI Artifact and can be deployed locally.
E2E test cases
basic scenario for Quickstart (P0)
signandverifycommands and flags combinations (about 16 test cases)notation sign <registry>/<repository>@<digest>notation sign --signature-format cose <registry>/<repository>@<digest>notation sign --key <key_name> <registry>/<repository>@<digest>notation sign <registry>/<repository>:<tag>notation sign --expiry 24h <registry>/<repository>@<digest>notation verify <registry>/<repository>@<digest>notation verify <registry>/<repository>:<tag>verifycommands with different trustpolicy.json files, including a variety of arguments combinations (about 10 test cases)For each argument in trustpolicy, including
name,registryScopes,signatureVerification,trustStores,trustedIdentities, generate valid and invalid values combinations and assert the result with predicted output.other commands with flags (about 22 test cases)
certificate addvalid and invalid casescertificate deletevalid and invalid casescertificate listlists empty results and multiple resultscertificate showvalid and invalid caseslistlists empty results and multiple resultslogin$REGISTRY_ADDRESS -u -plogin$REGISTRY_ADDRESSlogout$REGISTRY_ADDRESSkey addvalid and invalid caseskey deletevalid and invalid caseskey listempty result and multiple resultskey updatevalid and invalid casesversionsignandverifywith a plugin (P2)We need a toy plugin for testing and it should support
get-plugin-metadata,describe-key,generate-signature,generate-envelope,verify-signaturecommands. Also, supporttrust identityandrevocation checkfor verification.Beta Was this translation helpful? Give feedback.
All reactions