-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests(dot): modify integration test files
- add `integration` build tag to test files - improve existing integration test code
- Loading branch information
1 parent
02744c8
commit 63303a3
Showing
6 changed files
with
164 additions
and
260 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,29 @@ | ||
// Copyright 2021 ChainSafe Systems (ON) | ||
// SPDX-License-Identifier: LGPL-3.0-only | ||
|
||
//go:build integration | ||
// +build integration | ||
|
||
package dot | ||
|
||
import ( | ||
"os" | ||
"testing" | ||
|
||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
// TestExportConfig tests exporting a toml configuration file | ||
func TestExportConfig(t *testing.T) { | ||
cfg, cfgFile := newTestConfigWithFile(t) | ||
require.NotNil(t, cfg) | ||
|
||
genFile := NewTestGenesisRawFile(t, cfg) | ||
|
||
cfg.Init.Genesis = genFile | ||
|
||
err := InitNode(cfg) | ||
require.Nil(t, err) | ||
require.NoError(t, err) | ||
|
||
file := exportConfig(cfg, cfgFile.Name()) | ||
require.NotNil(t, file) | ||
os.Remove(file.Name()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.