bugfix: allow for other tests in serverconfig

Change-Id: I33a50e470ebb7ef8b17157c7b9d51aff427b2585
This commit is contained in:
mpl 2012-04-22 16:35:30 +02:00
parent 255ed2a472
commit 651d7779df
1 changed files with 3 additions and 2 deletions

View File

@ -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)
}