mirror of https://github.com/status-im/consul.git
add missing test
This commit is contained in:
parent
fe0e3aaaa0
commit
2c6f873ecd
|
@ -1418,6 +1418,13 @@ func TestReadConfigPaths_dir(t *testing.T) {
|
||||||
t.Fatalf("err: %s", err)
|
t.Fatalf("err: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// An empty file shouldn't be read
|
||||||
|
err = ioutil.WriteFile(filepath.Join(td, "d.json"),
|
||||||
|
[]byte{}, 0664)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("err: %s", err)
|
||||||
|
}
|
||||||
|
|
||||||
config, err := ReadConfigPaths([]string{td})
|
config, err := ReadConfigPaths([]string{td})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("err: %s", err)
|
t.Fatalf("err: %s", err)
|
||||||
|
|
Loading…
Reference in New Issue