Restructure Almanac tests in uAgents
Closed this issue · 2 comments
Archento commented
Current situation:
agent_registration.py
has 4 tests (2 sync, 2 async)- the tests in general take around 6 seconds each, most of the times ~20 seconds
- since we apply a GitHub Actions matrix these tests will be executed 7 times on different systems/versions
- sometimes they fail due to issues with the ledger/network or timeouts
- these tests take a lot of time / costing a lot of money compared to the rest of the CI workflow
We should rethink how to effectively test the registration functionality as that is not completely part of the uAgents framework but rather includes or represents an interface to the Almanac.
Maybe we can mock the smart contract responses or just take these test to a separate worker.
Archento commented
Proposal from @ejfitzgerald:
- Move the current tests into an integration test set and run them periodically. Let's say every day at midnight. The test results for this should be monitored and reported back to the team
- The test / code should be refactored so that we can isolate the network from the unit test