mirror of https://github.com/perkeep/perkeep.git
bugfix: allow for other tests in serverconfig
Change-Id: I33a50e470ebb7ef8b17157c7b9d51aff427b2585
This commit is contained in:
parent
255ed2a472
commit
651d7779df
|
@ -116,7 +116,7 @@ func configParser() *jsonconfig.ConfigParser {
|
|||
}
|
||||
|
||||
func testConfig(name string, t *testing.T) {
|
||||
obj, err := configParser().ReadFile("testdata/default.json")
|
||||
obj, err := configParser().ReadFile(name)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
@ -124,7 +124,8 @@ func testConfig(name string, t *testing.T) {
|
|||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
wantConf, err := configParser().ReadFile("testdata/default-want.json")
|
||||
wantFile := strings.Replace(name, ".json", "-want.json", 1)
|
||||
wantConf, err := configParser().ReadFile(wantFile)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue