Open domob1812 opened 4 years ago
@domob1812 Yes, I concur. What do you think is the best approach to writing the tests? Is it likely that we could copy the approximate logic of the Namecoin Core integration tests? (I assume that e.g. name_update
tests should be similar between Namecoin Core and Electrum-NMC.)
We might be able to copy some parts, but for that to work, we'd need to write a lot of general "test framework" code I think. The current Lightning tests are just shell scripts rather than Python, so probably the easiest way to do it would just be doing some very simple shell scripts from scratch that just register a name, update it and transfer it, or something. That should be enough to catch already most possible future regressions.
In the past there were already some cases where e.g. upstream merges broke even simple operations like
name_update
's with segwit/legacy wallets or the like. There are no automated tests for many of these, which I think is not acceptable for a security-oriented project like Namecoin.There should be at least some integration tests for basic things like registering and updating names with all types of addresses supported. We should be able to use the Lightning regtest scripts for that.