提交 2e512e81 作者: Brian Tiger Chow

test(config) add path assertion

上级 a5c0f67c
package config
import (
"fmt"
"testing"
)
func TestConfig(t *testing.T) {
const filename = ".ipfsconfig"
const dsPath = "/path/to/datastore"
cfgWritten := new(Config)
cfgWritten.Datastore.Path = dsPath
err := WriteConfigFile(filename, cfgWritten)
if err != nil {
t.Error(err)
......@@ -17,6 +18,7 @@ func TestConfig(t *testing.T) {
t.Error(err)
return
}
fmt.Printf(cfgRead.Datastore.Path)
if cfgWritten.Datastore.Path != cfgRead.Datastore.Path {
t.Fail()
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论