1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-23 21:47:52 +08:00

test(config) add path assertion

This commit is contained in:
Brian Tiger Chow
2014-09-12 04:36:07 -07:00
parent a5c0f67c8c
commit 2e512e81c9

View File

@ -1,13 +1,14 @@
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()
}
}