Improve Tests
eozturk1 opened this issue · comments
While transitioning from AZKS to oZKS, we have removed the tests that included HistoryNodeState
and HistoryChildState
. We should re-iterate over them and bring the logic they tested in the new tree structure.
The test differences between the the PR #206 and the main branch are:
Unused functions in oZKS:
< warning: function is never used: `test_lookups`
< --> integration_tests/src/test_util.rs:250:21
< |
< 250 | pub(crate) async fn test_lookups<S: akd::storage::Storage + Sync + Send, V: VRFKeyStorage>(
< | ^^^^^^^^^^^^
< |
< = note: `#[warn(dead_code)]` on by default
<
< warning: function is never used: `reset_mysql_db`
< --> integration_tests/src/test_util.rs:367:10
< |
< 367 | async fn reset_mysql_db<S: akd::storage::Storage + Sync + Send>(mysql_db: &S) {
< | ^^^^^^^^^^^^^^
<
< warning: function is never used: `test_directory_operations`
< --> integration_tests/src/mysql_tests.rs:15:10
< |
< 15 | async fn test_directory_operations() {
< | ^^^^^^^^^^^^^^^^^^^^^^^^^
<
< warning: function is never used: `test_lookups`
< --> integration_tests/src/mysql_tests.rs:70:10
< |
< 70 | async fn test_lookups() {
< | ^^^^^^^^^^^^
Missing tests in oZKS:
// Tracked in #207.
> append_only_zks::tests::test_append_only_proof: test
> append_only_zks::tests::test_append_only_proof_tiny: test
> append_only_zks::tests::test_append_only_proof_very_tiny: test
> tests::test_directory_polling_azks_change: test
> tests::test_limited_key_history: test
> tests::test_read_during_publish: test
> tests::test_simple_audit: test
> tests::test_tombstoned_key_history: test
> tests::test_history_proof_multiple_epochs: test
> tests::test_history_proof_single_epoch: test
> tests::test_simple_lookup: test
> memory_tests::test_directory_operations: test
> mysql_tests::test_directory_operations: test
> mysql_tests::test_lookups: test
> mysql_db_tests::test_mysql_db: test
// Tests below will be there after the merge
> fixture_generator::examples::example_tests::test_use_fixture: test
> fixture_generator::reader::tests::test_read: test
> fixture_generator::reader::tests::test_read_invalid_format: test
> tests::test_publish_skip_same_value: test
// To add:
> history_tree_node::tests::test_get_child_at_epoch_at_root: test
> history_tree_node::tests::test_get_child_at_existing_epoch_multiple_at_root: test
> history_tree_node::tests::test_set_child_without_hash_at_root: test
> history_tree_node::tests::test_set_children_without_hash_at_root: test
> history_tree_node::tests::test_set_children_without_hash_multiple_at_root: test
I will work on bringing back the tests in To add
section above. Although some of these tests are unnecessary for oZKS.
NOTE: cargo test -- --list --format=terse
and diff
was used to generate the list above.
cc @slawlor
@eozturk1 Was this completed, or is there still more to do here?
Most of these tests have been ported already and some (e.g., at epoch tests) are not needed. The rest is most likely already covered in high-level tests. Therefore I'll close this issue.