package cmd_test

import (
	"fmt"
	"testing"

	"github.com/stretchr/testify/require"

	svrcmd "git.cw.tr/mukan-network/mukan-sdk/server/cmd"
	"git.cw.tr/mukan-network/mukan-sdk/x/genutil/client/cli"

	"github.com/cosmos/ibc-go/simapp"
	"github.com/cosmos/ibc-go/simapp/simd/cmd"
)

func TestInitCmd(t *testing.T) {
	rootCmd := cmd.NewRootCmd()
	rootCmd.SetArgs([]string{
		"init",        // Test the init cmd
		"simapp-test", // Moniker
		fmt.Sprintf("--%s=%s", cli.FlagOverwrite, "true"), // Overwrite genesis.json, in case it already exists
	})

	require.NoError(t, svrcmd.Execute(rootCmd, "", simapp.DefaultNodeHome))
}
