-
Notifications
You must be signed in to change notification settings - Fork 278
tests: static test data generation #1806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
After seeing the 92% speedup 🚀 in test runtime when we drop legacy tests: we could even expand these static test sets, we clearly have the test runtime budget now. |
Adding to this: Our serialization tests are pretty good, but they are very "unit testy". Making sure that the output of the whole deserialize-serialize pipeline does not change is not really easy -- and adding test data for complete Metadata objects really stretches the viability of the "test data within test code" approach. So maybe we should have something like this:
To be clear, this plan only solves the serialization testing issue -- but nothing prevents these same metadata files from also forming real repository versions. |
One question that comes to my mind is about the purpose of these generation scripts.
If 1 is the idea, then it’s clear. |
There's clearly multiple options here. I would start with whatever seems most tangible and easiest to accomplish, and try to document the possible paths forward from there. So a first draft could look like this:
WRT to your questions:
|
I made a small prototype in my branch: https://github.com/MVrachev/tuf/tree/test-statics-data-generation. |
some thoughts from looking at the proto:
Many of the ideas above are things we could do later and might not be very fully fleshed out: getting the re-generation and test cycle working is the main thing here: they need to be something that does not get in the way. |
also another thought: now that we're creating more and more metadata from scratch, #1459 becomes more and more interesting: see #1459 (comment) especially |
I have created a simple script generating a simple set of metadata files and a test verifying that the statically stored metadata files are the same as the one generated by the test. |
current state:
We will want to modify the static files at some point (e.g. we should make the files consistent_snapshot), so we should have easy ability to do so. I believe that means we should
The text was updated successfully, but these errors were encountered: