From 4e79a48a9fcc45f675aeae92370e64984cd5f6c5 Mon Sep 17 00:00:00 2001 From: Sergio Mena Date: Tue, 17 Jan 2023 14:37:35 +0100 Subject: [PATCH] Rename inside `test/e2e` --- test/e2e/Makefile | 2 +- test/e2e/README.md | 22 +++++++++++----------- test/e2e/app/app.go | 2 +- test/e2e/generator/generate.go | 4 ++-- test/e2e/generator/main.go | 2 +- test/e2e/node/main.go | 6 +++--- test/e2e/pkg/manifest.go | 6 +++--- test/e2e/pkg/testnet.go | 2 +- test/e2e/runner/cleanup.go | 4 ++-- test/e2e/runner/setup.go | 8 ++++---- 10 files changed, 29 insertions(+), 29 deletions(-) diff --git a/test/e2e/Makefile b/test/e2e/Makefile index aa1d6eeb858..bf19ec9ae10 100644 --- a/test/e2e/Makefile +++ b/test/e2e/Makefile @@ -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 diff --git a/test/e2e/README.md b/test/e2e/README.md index 11e019f5fe3..2d157e73722 100644 --- a/test/e2e/README.md +++ b/test/e2e/README.md @@ -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 @@ -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 @@ -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", @@ -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 @@ -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. @@ -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 ``` diff --git a/test/e2e/app/app.go b/test/e2e/app/app.go index 505aab71675..8a1de4c1d49 100644 --- a/test/e2e/app/app.go +++ b/test/e2e/app/app.go @@ -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 diff --git a/test/e2e/generator/generate.go b/test/e2e/generator/generate.go index a13774b5f2b..cb2d316eed7 100644 --- a/test/e2e/generator/generate.go +++ b/test/e2e/generator/generate.go @@ -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{ @@ -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") { diff --git a/test/e2e/generator/main.go b/test/e2e/generator/main.go index 3ca00dddefb..02ce5779b98 100644 --- a/test/e2e/generator/main.go +++ b/test/e2e/generator/main.go @@ -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") diff --git a/test/e2e/node/main.go b/test/e2e/node/main.go index 9304f0ba496..9c5ff0253f4 100644 --- a/test/e2e/node/main.go +++ b/test/e2e/node/main.go @@ -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 { @@ -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 { diff --git a/test/e2e/pkg/manifest.go b/test/e2e/pkg/manifest.go index 5a88fb99012..5192e3b88ae 100644 --- a/test/e2e/pkg/manifest.go +++ b/test/e2e/pkg/manifest.go @@ -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 @@ -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 diff --git a/test/e2e/pkg/testnet.go b/test/e2e/pkg/testnet.go index 923ec44bfac..b89c94c2b0a 100644 --- a/test/e2e/pkg/testnet.go +++ b/test/e2e/pkg/testnet.go @@ -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 diff --git a/test/e2e/runner/cleanup.go b/test/e2e/runner/cleanup.go index fbe7aa0b4cc..92e305cc56c 100644 --- a/test/e2e/runner/cleanup.go +++ b/test/e2e/runner/cleanup.go @@ -62,7 +62,7 @@ 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) @@ -70,7 +70,7 @@ func cleanupDir(dir string) error { 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 } diff --git a/test/e2e/runner/setup.go b/test/e2e/runner/setup.go index fda6f8129ee..afe741de176 100644 --- a/test/e2e/runner/setup.go +++ b/test/e2e/runner/setup.go @@ -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), @@ -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 @@ -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 @@ -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.