-
Notifications
You must be signed in to change notification settings - Fork 117
Feature/proposals test coverage #399
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
Changes from 34 commits
2cd4010
d125bb2
96bdcec
5527844
20ff033
5ac4c2a
3c35b7d
3e0d381
9328be9
8ba80f2
ad1b0be
52e2dd0
239c80c
d2b986d
7138f79
387b981
644ea80
ff42ae6
f0795a4
2d44c1d
0d95545
03a16a2
114145f
b3f42a6
28e10a1
25b8097
d95bde2
2bb49e6
2f11cb8
d4dbc31
1109153
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,3 +22,9 @@ yarn* | |
|
|
||
| # Visual Studio Code | ||
| .vscode | ||
|
|
||
| # Compiled WASM code | ||
| *.wasm | ||
|
|
||
| # Chain specificaiton | ||
| chainspec.json | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,13 @@ | ||||||
| #!/bin/bash | ||||||
| cargo run --release -p joystream-node build-spec --chain dev > chainspec.json | ||||||
| sed -i 's/"setValidatorCountProposalGracePeriod":.*/"setValidatorCountProposalGracePeriod": 0,/' chainspec.json | ||||||
| sed -i 's/"runtimeUpgradeProposalGracePeriod":.*/"runtimeUpgradeProposalGracePeriod": 0,/' ./chainspec.json | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||||||
| sed -i 's/"setElectionParametersProposalGracePeriod":.*/"setElectionParametersProposalGracePeriod": 0,/' ./chainspec.json | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||||||
| sed -i 's/"textProposalGracePeriod":.*/"textProposalGracePeriod": 0,/' chainspec.json | ||||||
| sed -i 's/"setContentWorkingGroupMintCapacityProposalGracePeriod":.*/"setContentWorkingGroupMintCapacityProposalGracePeriod": 0,/' chainspec.json | ||||||
| sed -i 's/"setLeadProposalGracePeriod":.*/"setLeadProposalGracePeriod": 0,/' chainspec.json | ||||||
| sed -i 's/"spendingProposalGracePeriod":.*/"spendingProposalGracePeriod": 0,/' chainspec.json | ||||||
| sed -i 's/"evictStorageProviderProposalGracePeriod":.*/"evictStorageProviderProposalGracePeriod": 0,/' chainspec.json | ||||||
| sed -i 's/"setStorageRoleParametersProposalGracePeriod":.*/"setStorageRoleParametersProposalGracePeriod": 0/' chainspec.json | ||||||
| yes | cargo run --release -p joystream-node -- purge-chain --dev | ||||||
|
gleb-urvanov marked this conversation as resolved.
|
||||||
| cargo run --release -p joystream-node -- --chain=chainspec.json --alice --validator | ||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -4,17 +4,20 @@ | |||||
| "license": "GPL-3.0-only", | ||||||
| "scripts": { | ||||||
| "build": "tsc --build tsconfig.json", | ||||||
| "test": "mocha -r ts-node/register src/tests/*", | ||||||
| "test": "mocha -r ts-node/register src/tests/constantinople/proposals/*", | ||||||
| "test-migration": "mocha -r ts-node/register src/tests/rome/* && mocha -r ts-node/register src/tests/constantinople/*", | ||||||
| "lint": "tslint --project tsconfig.json", | ||||||
| "prettier": "prettier --write ./src" | ||||||
| }, | ||||||
| "dependencies": { | ||||||
| "@joystream/types": "^0.7.0", | ||||||
| "@joystream/types": "../joystream-apps/packages/joy-types", | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Final constantinople release
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We might as well also use alias
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||||||
| "@rome/types@npm:@joystream/types": "^0.7.0", | ||||||
| "@polkadot/api": "^0.96.1", | ||||||
| "@polkadot/keyring": "^1.7.0-beta.5", | ||||||
| "@types/bn.js": "^4.11.5", | ||||||
| "bn.js": "^4.11.8", | ||||||
| "dotenv": "^8.2.0", | ||||||
| "fs": "^0.0.1-security", | ||||||
| "uuid": "^7.0.3" | ||||||
| }, | ||||||
| "devDependencies": { | ||||||
|
|
||||||
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.
Although this approach is temporary and eventually we will have parameterized build of the runtime, and producing this chainspec file as an artifact of running tests will not be necessary, it should be generated in some temporary location folder, maybe the system temporary path?
This goes for any other temporary artifacts of course.
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.
done,
.tmpfolder introduced