-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
test(system): Introduce system tests - initial version heavily inspired by wasmd #20013
Conversation
WalkthroughThe changes involve introducing system testing capabilities for a blockchain system, excluding specific directories from security checks, and refining build and test workflows. Changes
Possibly related issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
9af5861
to
0be54ba
Compare
354a977
to
fafc2c9
Compare
f5bca81
to
590b8a2
Compare
dce136b
to
aacf13a
Compare
96f85d3
to
259e11b
Compare
8a809a4
to
c124edc
Compare
9b97f4d
to
e7eaa78
Compare
@@ -13,6 +13,10 @@ HTTPS_GIT := https://github.com/cosmos/cosmos-sdk.git | |||
DOCKER := $(shell which docker) | |||
PROJECT_NAME = $(shell git remote get-url origin | xargs basename -s .git) | |||
|
|||
ifeq ($(findstring .,$(VERSION)),) |
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.
When the version contains no dot, then it is not a semantic version. This is the case for a PR branch for example. The CLI requires a valid sematic version so I default to an unused one
|
||
require ( | ||
github.com/cosmos/cosmos-proto v1.0.0-beta.4 // indirect | ||
github.com/cosmos/cosmos-sdk v0.50.5 |
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.
Some SDK is used but as the system tests work with the current binary, this can be an older version.
@@ -0,0 +1,113 @@ | |||
//go:build system_test && linux |
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.
As the the old binary is fetched from docker, this does not run on mac. The hack for testing is to compile the old binary on the system and copy it to the binary
folder, so that it is not fetched again
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.
Actionable comments posted: 13
Out of diff range and nitpick comments (5)
systemtests/staking_test.go (1)
12-54
: TheTestStakeUnstake
function is well-structured for testing staking and unstaking scenarios. Consider adding more detailed comments to explain the steps and assertions for better readability and maintainability.systemtests/upgrade_test.go (1)
19-90
: TheTestChainUpgrade
function effectively simulates a chain upgrade scenario. Consider adding error handling for Docker commands to ensure robustness in case of command failures.systemtests/testnet_init.go (2)
16-26
: Ensure proper documentation for theSingleHostTestnetCmdInitializer
type.Adding a detailed comment explaining the purpose and usage of this type would improve code maintainability and readability.
68-79
: Ensure proper documentation for theModifyConfigYamlInitializer
type.Adding a detailed comment explaining the purpose and usage of this type would improve code maintainability and readability.
systemtests/cli.go (1)
33-46
: Ensure proper documentation for theCLIWrapper
type.Adding a detailed comment explaining the purpose and usage of this type would improve code maintainability and readability.
test-system: | ||
needs: [tests, test-integration, test-e2e] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-tags: true | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.22" | ||
check-latest: true | ||
cache: true | ||
cache-dependency-path: | | ||
simapp/go.sum | ||
systemtest/go.sum | ||
- uses: technote-space/get-diff-action@v6.1.2 | ||
id: git_diff | ||
with: | ||
PATTERNS: | | ||
**/*.go | ||
go.mod | ||
go.sum | ||
**/go.mod | ||
**/go.sum | ||
**/Makefile | ||
Makefile | ||
- name: Install musl lib for simd (docker) binary | ||
if: env.GIT_DIFF | ||
run: | | ||
sudo apt-get install -y musl | ||
- name: system tests v1 | ||
if: env.GIT_DIFF | ||
run: | | ||
COSMOS_BUILD_OPTIONS=legacy make test-system | ||
- uses: actions/upload-artifact@v3 | ||
if: failure() | ||
with: | ||
name: "testnet-setup" | ||
path: ./systemtests/testnet/ | ||
retention-days: 3 | ||
# - name: system tests v2 | ||
# if: env.GIT_DIFF | ||
# run: | | ||
# make test-system | ||
- uses: actions/upload-artifact@v3 | ||
if: failure() | ||
with: | ||
name: "testnet-setup" | ||
path: ./systemtests/testnet/ | ||
retention-days: 3 |
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.
Ensure consistent artifact naming and avoid duplicate steps.
In the test-system
job, the artifact name "testnet-setup" is used twice (lines 184 and 194) for uploading artifacts on failure. This could lead to overwriting of artifacts or confusion in artifact handling. Consider using unique names for each artifact or consolidating the steps if they are intended to capture the same files.
if execBinary == "" { | ||
panic("executable binary name must not be empty") | ||
} | ||
nameTokens := ExecBinaryUnversionedRegExp.FindAllString(execBinary, 1) | ||
if len(nameTokens) == 0 || nameTokens[0] == "" { | ||
panic("failed to parse project name from binary") | ||
} |
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.
Ensure proper error handling instead of panicking for empty executable binary names.
- panic("executable binary name must not be empty")
+ return nil, errors.New("executable binary name must not be empty")
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
if execBinary == "" { | |
panic("executable binary name must not be empty") | |
} | |
nameTokens := ExecBinaryUnversionedRegExp.FindAllString(execBinary, 1) | |
if len(nameTokens) == 0 || nameTokens[0] == "" { | |
panic("failed to parse project name from binary") | |
} | |
if execBinary == "" { | |
return nil, errors.New("executable binary name must not be empty") | |
} | |
nameTokens := ExecBinaryUnversionedRegExp.FindAllString(execBinary, 1) | |
if len(nameTokens) == 0 || nameTokens[0] == "" { | |
panic("failed to parse project name from binary") | |
} |
if err := os.RemoveAll(filepath.Join(WorkDir, s.outputDir)); err != nil { | ||
panic(err.Error()) | ||
} |
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.
Replace panic with proper error handling in SetupChain
.
- panic(err.Error())
+ return fmt.Errorf("failed to remove all files in directory: %w", err)
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
if err := os.RemoveAll(filepath.Join(WorkDir, s.outputDir)); err != nil { | |
panic(err.Error()) | |
} | |
if err := os.RemoveAll(filepath.Join(WorkDir, s.outputDir)); err != nil { | |
return fmt.Errorf("failed to remove all files in directory: %w", err) | |
} |
if err != nil { | ||
panic(fmt.Sprintf("open logfile error %#+v", err)) | ||
} |
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.
Replace panic with proper error handling in watchLogs
.
- panic(fmt.Sprintf("open logfile error %#+v", err))
+ return fmt.Errorf("open logfile error: %w", err)
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
if err != nil { | |
panic(fmt.Sprintf("open logfile error %#+v", err)) | |
} | |
if err != nil { | |
return fmt.Errorf("open logfile error: %w", err) | |
} |
### Features | ||
|
||
* (tests) [#20013](https://github.com/cosmos/cosmos-sdk/pull/20013) Introduce system tests to run multi node local testnet in CI |
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.
Ensure proper Markdown formatting by adding blank lines around the heading and the list.
+ Every module contains its own CHANGELOG.md. Please refer to the module you are interested in.
+
### Features
+
* (tests) [#20013](https://github.com/cosmos/cosmos-sdk/pull/20013) Introduce system tests to run multi node local testnet in CI
* (runtime) [#19953](https://github.com/cosmos/cosmos-sdk/pull/19953) Implement `core/transaction.Service` in runtime.
* (client) [#19905](https://github.com/cosmos/cosmos-sdk/pull/19905) Add grpc client config to `client.toml`.
* (runtime) [#19571](https://github.com/cosmos/cosmos-sdk/pull/19571) Implement `core/router.Service` in runtime. This service is present in all modules (when using depinject).
+
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
### Features | |
* (tests) [#20013](https://github.com/cosmos/cosmos-sdk/pull/20013) Introduce system tests to run multi node local testnet in CI | |
Every module contains its own CHANGELOG.md. Please refer to the module you are interested in. | |
### Features | |
* (tests) [#20013](https://github.com/cosmos/cosmos-sdk/pull/20013) Introduce system tests to run multi node local testnet in CI | |
* (runtime) [#19953](https://github.com/cosmos/cosmos-sdk/pull/19953) Implement `core/transaction.Service` in runtime. | |
* (client) [#19905](https://github.com/cosmos/cosmos-sdk/pull/19905) Add grpc client config to `client.toml`. | |
* (runtime) [#19571](https://github.com/cosmos/cosmos-sdk/pull/19571) Implement `core/router.Service` in runtime. This service is present in all modules (when using depinject). | |
in, err := os.Open(src) | ||
if err != nil { | ||
return nil, err |
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.
Ensure error handling when opening a file in copyFile
.
- if err != nil {
- return nil, err
- }
+ return nil, fmt.Errorf("failed to open source file: %w", err)
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
in, err := os.Open(src) | |
if err != nil { | |
return nil, err | |
in, err := os.Open(src) | |
return nil, fmt.Errorf("failed to open source file: %w", err) |
func (s ModifyConfigYamlInitializer) Initialize() { | ||
// init with legacy testnet command | ||
args := []string{ | ||
"testnet", | ||
"init-files", | ||
"--chain-id=" + s.chainID, | ||
"--output-dir=" + s.outputDir, | ||
"--v=" + strconv.Itoa(s.initialNodesCount), | ||
"--keyring-backend=test", | ||
"--minimum-gas-prices=" + s.minGasPrice, | ||
} | ||
s.log(fmt.Sprintf("+++ %s %s\n", s.execBinary, strings.Join(args, " "))) | ||
|
||
out, err := runShellCmdX(s.execBinary, args...) | ||
if err != nil { | ||
panic(err) | ||
} | ||
s.log(out) | ||
|
||
nodeAddresses := make([]string, s.initialNodesCount) | ||
for i := 0; i < s.initialNodesCount; i++ { | ||
nodeDir := filepath.Join(WorkDir, NodePath(i, s.outputDir, s.projectName), "config") | ||
id := string(mustV(p2p.LoadNodeKey(filepath.Join(nodeDir, "node_key.json"))).ID()) | ||
nodeAddresses[i] = fmt.Sprintf("%s@127.0.0.1:%d", id, p2pPortStart+i) | ||
} | ||
|
||
// then update configs | ||
for i := 0; i < s.initialNodesCount; i++ { | ||
nodeDir := filepath.Join(WorkDir, NodePath(i, s.outputDir, s.projectName), "config") | ||
nodeNumber := i | ||
EditToml(filepath.Join(nodeDir, "config.toml"), func(doc *tomledit.Document) { | ||
UpdatePort(doc, rpcPortStart+i, "rpc", "laddr") | ||
UpdatePort(doc, p2pPortStart+i, "p2p", "laddr") | ||
SetBool(doc, false, "p2p", "addr_book_strict") | ||
SetBool(doc, false, "p2p", "pex") | ||
SetBool(doc, true, "p2p", "allow_duplicate_ip") | ||
peers := make([]string, s.initialNodesCount) | ||
copy(peers, nodeAddresses[0:nodeNumber]) | ||
copy(peers[nodeNumber:], nodeAddresses[nodeNumber+1:]) | ||
SetValue(doc, strings.Join(peers, ","), "p2p", "persistent_peers") | ||
SetValue(doc, s.commitTimeout.String(), "consensus", "timeout_commit") | ||
}) | ||
EditToml(filepath.Join(nodeDir, "app.toml"), func(doc *tomledit.Document) { | ||
UpdatePort(doc, apiPortStart+i, "api", "address") | ||
UpdatePort(doc, grpcPortStart+i, "grpc", "address") | ||
SetBool(doc, true, "grpc-web", "enable") | ||
}) | ||
} | ||
} |
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.
Review the error handling strategy in the Initialize
method.
Using panic
for error handling is not recommended in production code as it can lead to abrupt termination of the program. Consider returning an error and handling it gracefully.
- panic(err)
+ return err
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
func (s ModifyConfigYamlInitializer) Initialize() { | |
// init with legacy testnet command | |
args := []string{ | |
"testnet", | |
"init-files", | |
"--chain-id=" + s.chainID, | |
"--output-dir=" + s.outputDir, | |
"--v=" + strconv.Itoa(s.initialNodesCount), | |
"--keyring-backend=test", | |
"--minimum-gas-prices=" + s.minGasPrice, | |
} | |
s.log(fmt.Sprintf("+++ %s %s\n", s.execBinary, strings.Join(args, " "))) | |
out, err := runShellCmdX(s.execBinary, args...) | |
if err != nil { | |
panic(err) | |
} | |
s.log(out) | |
nodeAddresses := make([]string, s.initialNodesCount) | |
for i := 0; i < s.initialNodesCount; i++ { | |
nodeDir := filepath.Join(WorkDir, NodePath(i, s.outputDir, s.projectName), "config") | |
id := string(mustV(p2p.LoadNodeKey(filepath.Join(nodeDir, "node_key.json"))).ID()) | |
nodeAddresses[i] = fmt.Sprintf("%s@127.0.0.1:%d", id, p2pPortStart+i) | |
} | |
// then update configs | |
for i := 0; i < s.initialNodesCount; i++ { | |
nodeDir := filepath.Join(WorkDir, NodePath(i, s.outputDir, s.projectName), "config") | |
nodeNumber := i | |
EditToml(filepath.Join(nodeDir, "config.toml"), func(doc *tomledit.Document) { | |
UpdatePort(doc, rpcPortStart+i, "rpc", "laddr") | |
UpdatePort(doc, p2pPortStart+i, "p2p", "laddr") | |
SetBool(doc, false, "p2p", "addr_book_strict") | |
SetBool(doc, false, "p2p", "pex") | |
SetBool(doc, true, "p2p", "allow_duplicate_ip") | |
peers := make([]string, s.initialNodesCount) | |
copy(peers, nodeAddresses[0:nodeNumber]) | |
copy(peers[nodeNumber:], nodeAddresses[nodeNumber+1:]) | |
SetValue(doc, strings.Join(peers, ","), "p2p", "persistent_peers") | |
SetValue(doc, s.commitTimeout.String(), "consensus", "timeout_commit") | |
}) | |
EditToml(filepath.Join(nodeDir, "app.toml"), func(doc *tomledit.Document) { | |
UpdatePort(doc, apiPortStart+i, "api", "address") | |
UpdatePort(doc, grpcPortStart+i, "grpc", "address") | |
SetBool(doc, true, "grpc-web", "enable") | |
}) | |
} | |
} | |
func (s ModifyConfigYamlInitializer) Initialize() error { | |
// init with legacy testnet command | |
args := []string{ | |
"testnet", | |
"init-files", | |
"--chain-id=" + s.chainID, | |
"--output-dir=" + s.outputDir, | |
"--v=" + strconv.Itoa(s.initialNodesCount), | |
"--keyring-backend=test", | |
"--minimum-gas-prices=" + s.minGasPrice, | |
} | |
s.log(fmt.Sprintf("+++ %s %s\n", s.execBinary, strings.Join(args, " "))) | |
out, err := runShellCmdX(s.execBinary, args...) | |
if err != nil { | |
return err | |
} | |
s.log(out) | |
nodeAddresses := make([]string, s.initialNodesCount) | |
for i := 0; i < s.initialNodesCount; i++ { | |
nodeDir := filepath.Join(WorkDir, NodePath(i, s.outputDir, s.projectName), "config") | |
id := string(mustV(p2p.LoadNodeKey(filepath.Join(nodeDir, "node_key.json"))).ID()) | |
nodeAddresses[i] = fmt.Sprintf("%s@127.0.0.1:%d", id, p2pPortStart+i) | |
} | |
// then update configs | |
for i := 0; i < s.initialNodesCount; i++ { | |
nodeDir := filepath.Join(WorkDir, NodePath(i, s.outputDir, s.projectName), "config") | |
nodeNumber := i | |
EditToml(filepath.Join(nodeDir, "config.toml"), func(doc *tomledit.Document) { | |
UpdatePort(doc, rpcPortStart+i, "rpc", "laddr") | |
UpdatePort(doc, p2pPortStart+i, "p2p", "laddr") | |
SetBool(doc, false, "p2p", "addr_book_strict") | |
SetBool(doc, false, "p2p", "pex") | |
SetBool(doc, true, "p2p", "allow_duplicate_ip") | |
peers := make([]string, s.initialNodesCount) | |
copy(peers, nodeAddresses[0:nodeNumber]) | |
copy(peers[nodeNumber:], nodeAddresses[nodeNumber+1:]) | |
SetValue(doc, strings.Join(peers, ","), "p2p", "persistent_peers") | |
SetValue(doc, s.commitTimeout.String(), "consensus", "timeout_commit") | |
}) | |
EditToml(filepath.Join(nodeDir, "app.toml"), func(doc *tomledit.Document) { | |
UpdatePort(doc, apiPortStart+i, "api", "address") | |
UpdatePort(doc, grpcPortStart+i, "grpc", "address") | |
SetBool(doc, true, "grpc-web", "enable") | |
}) | |
} | |
return nil | |
} |
Test framework for system tests. | ||
Starts and interacts with a (multi node) blockchain in Go. | ||
Supports | ||
* CLI | ||
* Servers | ||
* Events | ||
* RPC | ||
|
||
Uses: | ||
* testify | ||
* gjson | ||
* sjson | ||
Server and client side are executed on the host machine | ||
|
||
## Developer | ||
### Test strategy | ||
System tests cover the full stack via cli and a running (multi node) network. They are more expensive (in terms of time/ cpu) | ||
to run compared to unit or integration tests. | ||
Therefore, we focus on the **critical path** and do not cover every condition. | ||
|
||
### Execute a single test | ||
|
||
```sh | ||
go test -tags system_test -count=1 -v . --run TestStakeUnstake -verbose | ||
``` | ||
|
||
Test cli parameters | ||
|
||
* `-verbose` verbose output | ||
* `-wait-time` duration - time to wait for chain events (default 30s) | ||
* `-nodes-count` int - number of nodes in the cluster (default 4) | ||
|
||
# Port ranges | ||
With *n* nodes: | ||
* `26657` - `26657+n` - RPC | ||
* `1317` - `1317+n` - API | ||
* `9090` - `9090+n` - GRPC | ||
* `16656` - `16656+n` - P2P | ||
|
||
For example Node *3* listens on `26660` for RPC calls | ||
|
||
## Resources | ||
|
||
* [gjson query syntax](https://github.com/tidwall/gjson#path-syntax) | ||
|
||
## Disclaimer | ||
|
||
This is based on the system test framework in [wasmd](https://github.com/CosmWasm/wasmd) built by Confio. |
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.
Consider adding blank lines around headings for better readability and correct the grammatical error: change "For example Node 3 listens on 26660
for RPC calls" to "For example, Node 3 listens on 26660
for RPC calls".
- For example Node *3* listens on `26660` for RPC calls
+ For example, Node *3* listens on `26660` for RPC calls
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
Test framework for system tests. | |
Starts and interacts with a (multi node) blockchain in Go. | |
Supports | |
* CLI | |
* Servers | |
* Events | |
* RPC | |
Uses: | |
* testify | |
* gjson | |
* sjson | |
Server and client side are executed on the host machine | |
## Developer | |
### Test strategy | |
System tests cover the full stack via cli and a running (multi node) network. They are more expensive (in terms of time/ cpu) | |
to run compared to unit or integration tests. | |
Therefore, we focus on the **critical path** and do not cover every condition. | |
### Execute a single test | |
```sh | |
go test -tags system_test -count=1 -v . --run TestStakeUnstake -verbose | |
``` | |
Test cli parameters | |
* `-verbose` verbose output | |
* `-wait-time` duration - time to wait for chain events (default 30s) | |
* `-nodes-count` int - number of nodes in the cluster (default 4) | |
# Port ranges | |
With *n* nodes: | |
* `26657` - `26657+n` - RPC | |
* `1317` - `1317+n` - API | |
* `9090` - `9090+n` - GRPC | |
* `16656` - `16656+n` - P2P | |
For example Node *3* listens on `26660` for RPC calls | |
## Resources | |
* [gjson query syntax](https://github.com/tidwall/gjson#path-syntax) | |
## Disclaimer | |
This is based on the system test framework in [wasmd](https://github.com/CosmWasm/wasmd) built by Confio. | |
Test framework for system tests. | |
Starts and interacts with a (multi node) blockchain in Go. | |
Supports | |
* CLI | |
* Servers | |
* Events | |
* RPC | |
Uses: | |
* testify | |
* gjson | |
* sjson | |
Server and client side are executed on the host machine | |
## Developer | |
### Test strategy | |
System tests cover the full stack via cli and a running (multi node) network. They are more expensive (in terms of time/ cpu) | |
to run compared to unit or integration tests. | |
Therefore, we focus on the **critical path** and do not cover every condition. | |
### Execute a single test | |
```sh | |
go test -tags system_test -count=1 -v . --run TestStakeUnstake -verbose |
Test cli parameters
-verbose
verbose output-wait-time
duration - time to wait for chain events (default 30s)-nodes-count
int - number of nodes in the cluster (default 4)
Port ranges
With n nodes:
26657
-26657+n
- RPC1317
-1317+n
- API9090
-9090+n
- GRPC16656
-16656+n
- P2P
For example, Node 3 listens on 26660
for RPC calls
Resources
Disclaimer
This is based on the system test framework in wasmd built by Confio.
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
do the system tests also run the upgrade test? |
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.
utACK
we should create an issue to migrate our e2e tests to use the system tests to avoid all the duplication we currently have
"title": "my upgrade", | ||
"summary": "testing" | ||
}`, govAddr, upgradeName, upgradeHeight) | ||
proposalID := cli.SubmitAndVoteGovProposal(proposal) |
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.
This is the upgrade proposal on the v0.50 chain
t.Log("Upgrade height was reached. Upgrading chain") | ||
sut.SetExecBinary(currentBranchBinary) | ||
sut.SetTestnetInitializer(currentInitializer) | ||
sut.StartChain(t) |
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.
here the chain is started with the latest binary (compiled in the Makefile, copied to systemtests/binaries and default in main_test.go)
@@ -0,0 +1,162 @@ | |||
module cosmossdk.io/systemtests |
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.
Could you make a PR here: https://github.com/cosmos/vanity
cc @alpe
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.
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.
sorry, missed this. Thanks for the PR
Description
System test against a multi node chain.
This package contains an orchestration framework and tooling to make it easy to run tests against a running system.
The idea is that tests run the CLI binary on the server and client side like production chains.
To reviewer:
I may be easier to start with the tests and then look into the framework code.
I have...
!
in the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
Summary by CodeRabbit
Summary by CodeRabbit
New Features
Bug Fixes
VERSION
is set correctly in the build process when absent.Documentation
Chores
.gitignore
entries to support system testing.