You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
) will need to be adjusted). The facade is setup to wrap the contract, and is what most tests interact with instead of the contract directly. Adjusting the facade should fix most broken tests, but there may be some edge cases that require the test directly to be adjusted. For example, in the link above for the option round facade, instead of calling self.option_round_dispatcher.place.bid(), we should adjust this to calling self.get_vault_facade().place_bid() . This will be required for all of the above functions’ facade functions, as well as the xxx_expect_error() versions of the functions.
Fix facades so that all tests are back to passing
Disclaimer
🚨 Way earlier we introduced ‘sanity_checks’ which were designed to verify that the returned result of each function matches what is stored in the contract (every time it is called). For example, [the place bid sanity check](
) asserts that the bid_id returned from placing a bid matches the expected bid_id from the hashing. Off the top of my head I do not think these need adjustment, but keep them in mind if some tests remain broken.
The original idea was that the sanity checks could catch errors that unit tests might not be designed to catch, but currently unsure if this is still necessary.
We can consider removing sanity checks and adding unit tests instead to remove bloat, but is not necessary for this task.
The text was updated successfully, but these errors were encountered:
Sub Task 4:
🏗️ This will break a lot of the testing suite, to fix this, we only need to adjust the facades (I think only [the option round facade](
pitchlake_starknet/src/tests/utils/facades/option_round_facade.cairo
Line 162 in 81bbd8a
self.option_round_dispatcher.place.bid()
, we should adjust this to callingself.get_vault_facade().place_bid()
. This will be required for all of the above functions’ facade functions, as well as the xxx_expect_error() versions of the functions.Disclaimer
🚨 Way earlier we introduced ‘sanity_checks’ which were designed to verify that the returned result of each function matches what is stored in the contract (every time it is called). For example, [the place bid sanity check](
pitchlake_starknet/src/tests/utils/facades/sanity_checks.cairo
Line 63 in 81bbd8a
The text was updated successfully, but these errors were encountered: