-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(liveslots): relaxDurabilityRules should not make promises durable
We have "fake vat" testing environments which configure their copy of liveslots with a setting named `relaxDurabilityRules = true`. This changes the rules for durable objects, which normally refuse to accept non-durable state. When the rules are relaxed, they accept ephemeral and merely-virtual objects as well. Promises were never supposed to be accepted, even when the rules are relaxed. But liveslots had a bug, and accepted Promises in the relaxed mode. This PR changes liveslots to correctly reject them. Lacking this enforcement, some other packages had mistakenly stored Promises in durable objects, and gotten away with it. Now that liveslots is fixed, their tests would fail. So this PR also fixes those packages. One case is the smart-wallet, whose tests which use contexts.js will get a Zoe that uses fully-resolved `agoricNames` and `board`. But some tests are deliberately not using that context, to exercise what happens when E(zoe).startInstance() is given bad arguments. This changes the tests to use bad *resolved* arguments, as to Promises for bad arguments, because the latter now fails in a different way. Giving Zoe a promise in `terms` causes "value for instanceRecord is not durable", which is not what this test is trying to exercise. In addition, the expected error message was updated, because it now mentions things like "NameHubKit" instead of "Promise" in the unrelated (good) arguments. The provisionPool test was fixed with an unsatisfying `await null` stall. See #9598 for notes and plans for a better fix.
- Loading branch information
Showing
10 changed files
with
64 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters