-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdump_test.go
More file actions
36 lines (26 loc) · 825 Bytes
/
dump_test.go
File metadata and controls
36 lines (26 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package designer
import (
"github.com/v8platform/designer/tests"
"github.com/v8platform/errors"
"github.com/v8platform/runner"
"io/ioutil"
"path"
)
func (t *designerTestSuite) TestDumpCfg() {
confFile := path.Join(t.Pwd, "..", "tests", "fixtures", "0.9", "1Cv8.cf")
ib := tests.NewFileIB(t.TempIB)
err := runner.Run(ib, LoadCfgOptions{
Designer: NewDesigner(),
File: confFile},
runner.WithTimeout(30))
t.R().NoError(err, errors.GetErrorContext(err))
dtFile, _ := ioutil.TempFile("", "temp_dt.dt")
dtFile.Close()
err = runner.Run(ib, DumpCfgOptions{
File: dtFile.Name()},
runner.WithTimeout(30))
t.R().NoError(err, errors.GetErrorContext(err))
fileCreated, err2 := tests.Exists(dtFile.Name())
t.R().NoError(err2)
t.R().True(fileCreated, "Файл должен быть создан")
}