Some checks are pending
Docs Deploy / build_and_deploy (push) Waiting to run
Generate Docs / cli (push) Waiting to run
Generate Config Doc / cli (push) Waiting to run
Go formatting / go-formatting (push) Waiting to run
Check links / markdown-link-check (push) Waiting to run
Integration / pre-test (push) Waiting to run
Integration / test on (push) Blocked by required conditions
Integration / status (push) Blocked by required conditions
Lint / Lint Go code (push) Waiting to run
Test / test (ubuntu-latest) (push) Waiting to run
27 lines
435 B
Go
27 lines
435 B
Go
package testdata
|
|
|
|
import (
|
|
"bytes"
|
|
_ "embed"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
"gopkg.in/yaml.v3"
|
|
|
|
v0 "github.com/ignite/cli/v29/ignite/config/chain/v0"
|
|
)
|
|
|
|
//go:embed config.yaml
|
|
var ConfigYAML []byte
|
|
|
|
func GetConfig(t *testing.T) *v0.Config {
|
|
c := &v0.Config{}
|
|
|
|
err := yaml.NewDecoder(bytes.NewReader(ConfigYAML)).Decode(c)
|
|
require.NoError(t, err)
|
|
|
|
err = c.SetDefaults()
|
|
require.NoError(t, err)
|
|
|
|
return c
|
|
}
|