Tests: download a target with succinct_roles enabled#2031
Tests: download a target with succinct_roles enabled#2031jku merged 3 commits intotheupdateframework:developfrom
Conversation
Pull Request Test Coverage Report for Build 2516412956Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
jku
left a comment
There was a problem hiding this comment.
So, I'm happy to merge this, it's better than what we have. However it feels like it's just the delegation graph test test_succinct_roles_graph_traversal with download_target() call added to the end...
Some potential ways to improve:
- avoid duplicating all delegation graph checks: those checks are complex and I feel like they harm the readability of this test. Maybe it makes sense to verify the delegated role (exp_calls) in the end but even that is debatable
- actually check that the target content is the expected one, stop using the same content for all targets
- it's very minimal WRT repository content: e.g. there is never more than one target file in a delegated targets metadata, or even the whole repository. I think we could get more real coverage if we setup a repository with succinct delegation to lots of generated targets (like maybe targets could be every two character combination as file content -- 26*26 files, and filename could be the same as file content), and then the subtests could be a dozen target downloads from that repo?
I'm marking approve, but let me know your opinion
Add test downloading a target file when succonct_roles is used and as such test the whole updater downloading workflow. Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
a21e0a1 to
56b14f0
Compare
Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
56b14f0 to
7d389f3
Compare
|
I rewrote the whole test and used a different approach. If you don't like that approach I can rever the new commit. |
jku
left a comment
There was a problem hiding this comment.
I like this, very nice! 1000 files sounds like a lot but if it's not slow I'm not complaining.
Left two comments but this is great as is 👍
looking at just results for this CI run, this seems to increase complete test suite runtime by ~50% Please test this before writing 1000 files. |
|
Actually (since martin may be on a holiday) I can push a commit here myself that fixes the minor issues: will merge after that |
* move to the test file that contains all the other download tests * don't write 1000 files: it can be slow in CI * Compare file content to what was originally written (also read the whole file content) * Remove try-except that seems unused Signed-off-by: Jussi Kukkonen <jku@goto.fi>
23deb05 to
01b30cc
Compare
|
Thank you for pushing the changes @jku! |
Related to issue #1909
Description of the changes being introduced by the pull request:
Add test downloading a target file when
succonct_rolesis used and assuch test the whole updater downloading workflow.
Signed-off-by: Martin Vrachev mvrachev@vmware.com
Please verify and check that the pull request fulfills the following
requirements: