Commit dd08e0ed authored by Juan Batiz-Benet's avatar Juan Batiz-Benet

config test: write local file

parent b12134cd
......@@ -51,7 +51,9 @@ func Load(filename string) (*Config, error) {
// if nothing is there, write first config file.
if _, err := os.Stat(filename); os.IsNotExist(err) {
WriteFile(filename, []byte(defaultConfigFile))
if err := WriteFile(filename, []byte(defaultConfigFile)); err != nil {
return nil, err
}
}
var cfg Config
......
......@@ -7,7 +7,7 @@ import (
func TestConfig(t *testing.T) {
cfg, err := Load("")
cfg, err := Load(".ipfsconfig")
if err != nil {
t.Error(err)
return
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment