8000 Rename inside `test/e2e` by sergio-mena · Pull Request #139 · cometbft/cometbft · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Rename inside test/e2e #139

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

Merged
merged 1 commit into from
Jan 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/e2e/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ docker:
docker build --tag cometbft/e2e-node --tag cometbft/e2e-node:local-version -f docker/Dockerfile ../..

# We need to build support for database backends into the app in
# order to build a binary with a Tendermint node in it (for built-in
# order to build a binary with a CometBFT node in it (for built-in
# ABCI testing).
node:
go build -o build/node -tags badgerdb,boltdb,cleveldb,rocksdb ./node
Expand Down
22 changes: 11 additions & 11 deletions test/e2e/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# End-to-End Tests

Spins up and tests Tendermint networks in Docker Compose based on a testnet manifest. To run the CI testnet:
Spins up and tests CometBFT networks in Docker Compose based on a testnet manifest. To run the CI testnet:

```sh
make
Expand Down Expand Up @@ -30,7 +30,7 @@ Multiple testnets can be run with the `run-multiple.sh` script:
./run-multiple.sh networks/generated/gen-group3-*.toml
```

Testnets running different versions of Tendermint can be generated by the
Testnets running different versions of CometBFT can be generated by the
generator. For example:

```sh
Expand All @@ -45,7 +45,7 @@ generator. For example:

# Using "latest" will cause the generator to auto-detect the latest
# non-pre-release version tag in the current Git repository that is closest to
# the Tendermint version in the current local code (as specified in
# the CometBFT version in the current local code (as specified in
# ../../version/version.go).
#
# In the example below, if the local version.TMCoreSemVer value is "v0.34.24",
Expand All @@ -56,8 +56,8 @@ generator. For example:
```

**NB**: The corresponding Docker images for the relevant versions of the E2E
node (the `tendermint/e2e-node` image) must be available on the local machine,
or via [Docker Hub](https://hub.docker.com/r/tendermint/e2e-node).
node (the `cometbft/e2e-node` image) must be available on the local machine,
or via [Docker Hub](https://hub.docker.com/r/cometbft/e2e-node).

## Test Stages

Expand Down Expand Up @@ -167,15 +167,15 @@ The E2E test harness is designed to run several nodes of varying configurations

```bash
make node
tendermint init validator
TMHOME=$HOME/.tendermint ./build/node ./node/built-in.toml
cometbft init validator
TMHOME=$HOME/.cometbft ./build/node ./node/built-in.toml
```

To make things simpler the e2e application can also be run in the tendermint binary
To make things simpler the e2e application can also be run in the `cometbft` binary
by running

```bash
tendermint start --proxy-app e2e
cometbft start --proxy-app e2e
```

However this won't offer the same level of configurability of the application.
Expand All @@ -184,8 +184,8 @@ However this won't offer the same level of configurability of the application.

```bash
make node
tendermint init validator
tendermint start
cometbft init validator
cometbft start
./build/node ./node.socket.toml
```

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type Application struct {
// Config allows for the setting of high level parameters for running the e2e Application
// KeyType and ValidatorUpdates must be the same for all nodes running the same application.
type Config struct {
// The directory with which state.json will be persisted in. Usually $HOME/.tendermint/data
// The directory with which state.json will be persisted in. Usually $HOME/.cometbft/data
Dir string `toml:"dir"`

// SnapshotInterval specifies the height interval at which the application
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/generator/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ func parseWeightedVersions(s string) (weightedChoice, error) {
}

// Extracts the latest release version from the given Git repository. Uses the
// current version of Tendermint Core to establish the "major" version
// current version of CometBFT to establish the "major" version
// currently in use.
func gitRepoLatestReleaseVersion(gitRepoDir string) (string, error) {
opts := &git.PlainOpenOptions{
Expand Down Expand Up @@ -406,7 +406,7 @@ func findLatestReleaseTag(baseVer string, tags []string) (string, error) {
if latestVer == nil {
return "", nil
}
// Ensure the version string has a "v" prefix, because all Tendermint E2E
// Ensure the version string has a "v" prefix, because all CometBFT E2E
// node Docker images' versions have a "v" prefix.
vs := latestVer.String()
if !strings.HasPrefix(vs, "v") {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/generator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func NewCLI() *CLI {

cli.root.PersistentFlags().StringP("dir", "d", "", "Output directory for manifests")
_ = cli.root.MarkPersistentFlagRequired("dir")
cli.root.PersistentFlags().StringP("multi-version", "m", "", "Comma-separated list of versions of Tendermint to test in the generated testnets, "+
cli.root.PersistentFlags().StringP("multi-version", "m", "", "Comma-separated list of versions of CometBFT to test in the generated testnets, "+
"or empty to only use this branch's version")
cli.root.PersistentFlags().IntP("groups", "g", 0, "Number of groups")

Expand Down
6 changes: 3 additions & 3 deletions test/e2e/node/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func run(configFile string) error {
}
}

// startApp starts the application server, listening for connections from Tendermint.
// startApp starts the application server, listening for connections from CometBFT.
func startApp(cfg *Config) error {
app, err := app.NewApplication(cfg.App())
if err != nil {
Expand All @@ -108,8 +108,8 @@ func startApp(cfg *Config) error {
return nil
}

// startNode starts a Tendermint node running the application directly. It assumes the Tendermint
// configuration is in $TMHOME/config/tendermint.toml.
// startNode starts a CometBFT node running the application directly. It assumes the CometBFT
// configuration is in $TMHOME/config/cometbft.toml.
//
// FIXME There is no way to simply load the configuration from a file, so we need to pull in Viper.
func startNode(cfg *Config) error {
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/pkg/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ type Manifest struct {
// ABCIProtocol specifies the protocol used to communicate with the ABCI
// application: "unix", "tcp", "grpc", "builtin" or "builtin_unsync".
//
// Defaults to "builtin". "builtin" will build a complete Tendermint node
// Defaults to "builtin". "builtin" will build a complete CometBFT node
// into the application and launch it instead of launching a separate
// Tendermint process.
// CometBFT process.
//
// "builtin_unsync" is basically the same as "builtin", except that it uses
// an "unsynchronized" local client creator, which attempts to replicate the
Expand All @@ -87,7 +87,7 @@ type ManifestNode struct {
// is generated), and seed nodes run in seed mode with the PEX reactor enabled.
Mode string `toml:"mode"`

// Version specifies which version of Tendermint this node is. Specifying different
// Version specifies which version of CometBFT this node is. Specifying different
// versions for different nodes allows for testing the interaction of different
// node's compatibility. Note that in order to use a node at a particular version,
// there must be a docker image of the test app tagged with this version present
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/pkg/testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ type Testnet struct {
CheckTxDelay time.Duration
}

// Node represents a Tendermint node in a testnet.
// Node represents a CometBFT node in a testnet.
type Node struct {
Name string
Version string
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/runner/cleanup.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ func cleanupDir(dir string) error {

logger.Info("cleanup dir", "msg", log.NewLazySprintf("Removing testnet directory %q", dir))

// On Linux, some local files in the volume will be owned by root since Tendermint
// On Linux, some local files in the volume will be owned by root since CometBFT
// runs as root inside the container, so we need to clean them up from within a
// container running as root too.
absDir, err := filepath.Abs(dir)
if err != nil {
return err
}
err = execDocker("run", "--rm", "--entrypoint", "", "-v", fmt.Sprintf("%v:/network", absDir),
"tendermint/e2e-node", "sh", "-c", "rm -rf /network/*/")
"cometbft/e2e-node", "sh", "-c", "rm -rf /network/*/")
if err != nil {
return err
}
Expand Down
8 changes: 4 additions & 4 deletions test/e2e/runner/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func Setup(testnet *e2e.Testnet, infp infra.Provider) error {
filepath.Join(nodeDir, PrivvalStateFile),
)).Save()

// Set up a dummy validator. Tendermint requires a file PV even when not used, so we
// Set up a dummy validator. CometBFT requires a file PV even when not used, so we
// give it a dummy such that it will fail if it actually tries to use it.
(privval.NewFilePV(ed25519.GenPrivKey(),
filepath.Join(nodeDir, PrivvalDummyKeyFile),
Expand Down Expand Up @@ -139,7 +139,7 @@ func MakeGenesis(testnet *e2e.Testnet) (types.GenesisDoc, error) {
Power: power,
})
}
// The validator set will be sorted internally by Tendermint ranked by power,
// The validator set will be sorted internally by CometBFT ranked by power,
// but we sort it here as well so that all genesis files are identical.
sort.Slice(genesis.Validators, func(i, j int) bool {
return strings.Compare(genesis.Validators[i].Name, genesis.Validators[j].Name) == -1
Expand All @@ -154,7 +154,7 @@ func MakeGenesis(testnet *e2e.Testnet) (types.GenesisDoc, error) {
return genesis, genesis.ValidateAndComplete()
}

// MakeConfig generates a Tendermint config for a node.
// MakeConfig generates a CometBFT config for a node.
func MakeConfig(node *e2e.Node) (*config.Config, error) {
cfg := config.DefaultConfig()
cfg.Moniker = node.Name
Expand All @@ -181,7 +181,7 @@ func MakeConfig(node *e2e.Node) (*config.Config, error) {
return nil, fmt.Errorf("unexpected ABCI protocol setting %q", node.ABCIProtocol)
}

// Tendermint errors if it does not have a privval key set up, regardless of whether
// CometBFT errors if it does not have a privval key set up, regardless of whether
// it's actually needed (e.g. for remote KMS or non-validators). We set up a dummy
// key here by default, and use the real key for actual validators that should use
// the file privval.
Expand Down
0