Skip to content
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

[backport] Rename inside test/e2e (#139) #144

Merged
merged 2 commits into from
Jan 18, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 tendermint/e2e-node --tag tendermint/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 @@ -138,15 +138,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 @@ -155,8 +155,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 @@ -35,7 +35,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 @@ -55,7 +55,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", "", "Include multi-version testing."+
"If multi-version is not specified, then only the current Tendermint version will be used in generated testnets.")
"If multi-version is not specified, then only the current CometBFT version will be used in generated testnets.")
cli.root.PersistentFlags().IntP("groups", "g", 0, "Number of groups")

return cli
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 @@ -58,8 +58,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"`

// Add artificial delays to each of the main ABCI calls to mimic computation time
Expand All @@ -81,7 +81,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 @@ -76,7 +76,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