2019-05-16 08:25:32 -07:00
|
|
|
package genutil
|
2019-02-08 13:45:41 -08:00
|
|
|
|
|
|
|
import (
|
|
|
|
"encoding/json"
|
|
|
|
"path/filepath"
|
|
|
|
"testing"
|
|
|
|
"time"
|
|
|
|
|
2020-07-09 05:21:20 -07:00
|
|
|
"github.com/cosmos/cosmos-sdk/testutil"
|
2019-02-08 13:45:41 -08:00
|
|
|
|
|
|
|
"github.com/stretchr/testify/require"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestExportGenesisFileWithTime(t *testing.T) {
|
|
|
|
t.Parallel()
|
2020-07-09 05:21:20 -07:00
|
|
|
dir, cleanup := testutil.NewTestCaseDir(t)
|
2020-03-01 16:16:23 -08:00
|
|
|
t.Cleanup(cleanup)
|
2019-02-08 13:45:41 -08:00
|
|
|
|
|
|
|
fname := filepath.Join(dir, "genesis.json")
|
2020-08-14 10:58:53 -07:00
|
|
|
require.NoError(t, ExportGenesisFileWithTime(fname, "test", nil, json.RawMessage(`{"account_owner": "Bob"}`), time.Now()))
|
2019-02-08 13:45:41 -08:00
|
|
|
}
|