-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integration tests #83
Merged
+7,958
−12
Merged
Changes from 8 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
d8b9cb8
set up test environment with null upgrade
15c0af1
setup tests
f904f1f
add market tests
3a0ea52
clean up
15b483e
add null upgrade and setup minting tests
8045f77
mint and inventory tests
d8ce568
market metrics and governance tests
7dd4fab
cleanup
e7a2c20
contract upgrade
2edfba0
storage node tests
8d17e4d
chain storage market metric tests
f7a4fc8
vstorage market tests
a14a5a9
more market vstorage tests
26a4fb3
inventory and upgrade vstorage tests
a62f551
add comments
ecdadce
update unmarshalling
a3f571e
add checks to null upgrade test
00615b2
Merge branch 'develop' into contract/upgradability-tests
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
38 changes: 38 additions & 0 deletions
38
agoric/contract/test/swingsetTests/bootstrap/bootstrap-governance.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { AmountMath } from '@agoric/ertp'; | ||
import { makeCopyBag } from '@agoric/store'; | ||
import { E } from '@endo/far'; | ||
import { flow } from '../flow.js'; | ||
|
||
export async function blockMethods(context) { | ||
/** @type {Context} */ | ||
const { publicFacet, governorFacets, contractAssets, purses, zoe } = context; | ||
|
||
await E(governorFacets.creatorFacet).setFilters(['mintCharacterNfts']); | ||
|
||
console.log(`TG `, (await E(purses.item).getCurrentAmount()).value.payload); | ||
|
||
const { want } = flow.mintCharacter.expected; | ||
|
||
const mintCharacterInvitation = await E( | ||
publicFacet, | ||
).makeMintCharacterInvitation(); | ||
const copyBagAmount = makeCopyBag(harden([[want, 1n]])); | ||
const proposal = harden({ | ||
want: { | ||
Asset: AmountMath.make( | ||
contractAssets.character.brand, | ||
harden(copyBagAmount), | ||
), | ||
}, | ||
}); | ||
|
||
try { | ||
await E(zoe).offer(mintCharacterInvitation, proposal); | ||
} catch (error) { | ||
assert.equal( | ||
error.message, | ||
'not accepting offer with description "mintCharacterNfts"', | ||
); | ||
throw error; | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering how to revert this, maybe
await E(governorFacets.creatorFacet).setFilters([]);
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I havent really looked into this but what you wrote makes sense. It should really affect the tests though cause each test file runs independent of the others.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah that makes sense, I'll check with Agoric about this