Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ignite
GitHub Repository: ignite/cli
Path: blob/main/integration/other_components/cmd_chain_registry_test.go
1007 views
1
//go:build !relayer
2
3
package other_components_test
4
5
import (
6
"os"
7
"path/filepath"
8
"testing"
9
10
"github.com/stretchr/testify/require"
11
12
"github.com/ignite/cli/v29/ignite/pkg/cmdrunner/step"
13
envtest "github.com/ignite/cli/v29/integration"
14
)
15
16
func TestCreateChainRegistry(t *testing.T) {
17
var (
18
env = envtest.New(t)
19
app = env.ScaffoldApp("github.com/test/mars")
20
)
21
22
env.Must(env.Exec("create chain-registry files",
23
step.NewSteps(step.New(
24
step.Exec(envtest.IgniteApp,
25
"s",
26
"chain-registry",
27
),
28
step.Workdir(app.SourcePath()),
29
)),
30
))
31
32
_, statErr := os.Stat(filepath.Join(app.SourcePath(), "chain.json"))
33
require.False(t, os.IsNotExist(statErr), "chain.json cannot be found")
34
35
_, statErr = os.Stat(filepath.Join(app.SourcePath(), "assetlist.json"))
36
require.False(t, os.IsNotExist(statErr), "assetlist.json cannot be found")
37
38
app.EnsureSteady()
39
}
40
41