From 338d59f2a3ae1be964d03f05b5382c07e3dbba74 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Fri, 22 Nov 2024 17:12:06 +0100 Subject: [PATCH] refactor(testnet): change alias and local-chains dir (#4409) * refactor(testnet): change alias and local-chains dir * `make lint-fix` (cherry picked from commit 00ff829ef6dc0a9110c7fe3587c8edc9406a47f7) --- docs/docs/03-CLI-Commands/01-cli-commands.md | 2 +- ignite/cmd/testnet.go | 9 +++------ ignite/cmd/testnet_multi_node.go | 5 ++--- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/docs/docs/03-CLI-Commands/01-cli-commands.md b/docs/docs/03-CLI-Commands/01-cli-commands.md index 48e5d30a64..b70e8d627b 100644 --- a/docs/docs/03-CLI-Commands/01-cli-commands.md +++ b/docs/docs/03-CLI-Commands/01-cli-commands.md @@ -3755,7 +3755,7 @@ Each validator's bonded stake can be adjusted according to your testing needs, p The multi-node command not only initializes these nodes but also gives you control over starting, stopping individual nodes. This level of control ensures you can test and iterate rapidly without needing to reinitialize the entire network each time a change is made. This makes it ideal for experimenting with validator behavior, network dynamics, and the impact of various configurations. -All initialized nodes will be stored under the `.ignite/local-chains//testnet/` directory, which allows easy access and management. +All initialized nodes will be stored under the `.ignite/local-chains//testnet/` directory, which allows easy access and management. Usage diff --git a/ignite/cmd/testnet.go b/ignite/cmd/testnet.go index 6574cf8e48..da91e7213a 100644 --- a/ignite/cmd/testnet.go +++ b/ignite/cmd/testnet.go @@ -7,12 +7,9 @@ import ( // NewTestnet returns a command that groups scaffolding related sub commands. func NewTestnet() *cobra.Command { c := &cobra.Command{ - Use: "testnet [command]", - Short: "Start a testnet local", - Long: `Start a testnet local - -`, - Aliases: []string{"s"}, + Use: "testnet [command]", + Short: "Start a testnet local", + Aliases: []string{"t"}, Args: cobra.ExactArgs(1), } diff --git a/ignite/cmd/testnet_multi_node.go b/ignite/cmd/testnet_multi_node.go index 0c7503027d..a99bba1f05 100644 --- a/ignite/cmd/testnet_multi_node.go +++ b/ignite/cmd/testnet_multi_node.go @@ -2,6 +2,7 @@ package ignitecmd import ( "os" + "path" "strconv" "time" @@ -46,8 +47,6 @@ func NewTestnetMultiNode() *cobra.Command { Usage: ignite testnet multi-node [flags] - - `, Args: cobra.NoArgs, RunE: testnetMultiNodeHandler, @@ -107,7 +106,7 @@ func testnetMultiNode(cmd *cobra.Command, session *cliui.Session) error { } nodeDirPrefix, _ := cmd.Flags().GetString(flagNodeDirPrefix) - outputDir, err := xfilepath.Join(igcfg.DirPath, xfilepath.Path("local-chains/"+c.Name()+"d/"+"testnet/"))() + outputDir, err := xfilepath.Join(igcfg.DirPath, xfilepath.Path(path.Join("local-chains", c.Name(), "testnet")))() if err != nil { return err }