laconicd/cmd/laconic2d/cmd_test.go
Prathamesh Musale 33b6cce362
All checks were successful
Lint / Run golangci-lint (push) Successful in 2m55s
Integration Tests / test-integration (push) Successful in 2m56s
E2E Tests / test-e2e (push) Successful in 3m35s
Unit Tests / test-unit (push) Successful in 1m12s
Additional CI workflows (#16)
Reviewed-on: deep-stack/laconic2d#16
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
2024-03-07 09:11:53 +00:00

29 lines
740 B
Go

package main_test
import (
"fmt"
"testing"
"github.com/stretchr/testify/require"
"github.com/cosmos/cosmos-sdk/client/flags"
svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"
"github.com/cosmos/cosmos-sdk/x/genutil/client/cli"
"git.vdb.to/cerc-io/laconic2d/app"
"git.vdb.to/cerc-io/laconic2d/cmd/laconic2d/cmd"
)
func TestInitCmd(t *testing.T) {
rootCmd := cmd.NewRootCmd()
rootCmd.SetArgs([]string{
"init", // Test the init cmd
"localtestnet", // Moniker
fmt.Sprintf("--%s=%s", cli.FlagOverwrite, "true"), // Overwrite genesis.json, in case it already exists
fmt.Sprintf("--%s=%s", flags.FlagChainID, "laconic_9000-1"),
})
err := svrcmd.Execute(rootCmd, "", app.DefaultNodeHome)
require.NoError(t, err)
}