Skip to content

Commit

Permalink
[backport] Rename inside test/e2e (#139) (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
sergio-mena committed Jan 18, 2023
1 parent bd95985 commit 482f577
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 23 deletions.
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
14 changes: 7 additions & 7 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 @@ -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
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 @@ -97,7 +97,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 @@ -115,8 +115,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 @@ -53,8 +53,8 @@ type Manifest struct {

// ABCIProtocol specifies the protocol used to communicate with the ABCI
// application: "unix", "tcp", "grpc", or "builtin". Defaults to builtin.
// builtin will build a complete Tendermint node into the application and
// launch it instead of launching a separate Tendermint process.
// builtin will build a complete CometBFT node into the application and
// launch it instead of launching a separate CometBFT process.
ABCIProtocol string `toml:"abci_protocol"`

LoadTxSizeBytes int `toml:"load_tx_size_bytes"`
Expand All @@ -69,7 +69,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 @@ -70,7 +70,7 @@ type Testnet struct {
ABCIProtocol string
}

// 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 @@ -112,7 +112,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 @@ -141,7 +141,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 @@ -156,7 +156,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 @@ -183,7 +183,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 comments on commit 482f577

Please sign in to comment.