Closed Abdulbois closed 8 months ago
As the new field is optional, and we have to manually pass it to the object constructor in every handler and every CLI command, there is a risk that we may unintentionally forget to pass it somewhere. So, I would recommend to add such tests for every command. Either have a dedicated/separate test where we explicitly set schema version for all add/update commands and check that it has been set/updated, or extend existing Add/Update tests. I know that we already have such tests for some transactions, I think it's important to have it for all of them.
Note: it seems such checks (that we pass and apply optional parameters correctly) may be duplicated in unit and CLI tests. Although usually we prefer unit tests, in this case we may consider having CLI tests only (as it implicitly covers the unit test cases as well).
I think, currently all txn CLI calls are checked for using schemaVersion
in their commands
To be sure will double check
I noticed that unit tests for static validation are missing, I think it makes sense to add them
Added, please recheck
Created task: https://github.com/zigbee-alliance/distributed-compliance-ledger/issues/556