Skip to content

Commit

Permalink
refactor(testnet): change alias and local-chains dir (#4409)
Browse files Browse the repository at this point in the history
* refactor(testnet): change alias and local-chains dir

* `make lint-fix`

(cherry picked from commit 00ff829)
  • Loading branch information
julienrbrt authored and mergify[bot] committed Nov 22, 2024
1 parent 363912c commit 338d59f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/docs/03-CLI-Commands/01-cli-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<appd>/testnet/` directory, which allows easy access and management.
All initialized nodes will be stored under the `.ignite/local-chains/<app>/testnet/` directory, which allows easy access and management.


Usage
Expand Down
9 changes: 3 additions & 6 deletions ignite/cmd/testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}

Expand Down
5 changes: 2 additions & 3 deletions ignite/cmd/testnet_multi_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package ignitecmd

import (
"os"
"path"
"strconv"
"time"

Expand Down Expand Up @@ -46,8 +47,6 @@ func NewTestnetMultiNode() *cobra.Command {
Usage:
ignite testnet multi-node [flags]
`,
Args: cobra.NoArgs,
RunE: testnetMultiNodeHandler,
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 338d59f

Please sign in to comment.