From 651d7779df14da867e2eb9d165b1241219b53041 Mon Sep 17 00:00:00 2001 From: mpl Date: Sun, 22 Apr 2012 16:35:30 +0200 Subject: [PATCH] bugfix: allow for other tests in serverconfig Change-Id: I33a50e470ebb7ef8b17157c7b9d51aff427b2585 --- pkg/serverconfig/serverconfig_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/serverconfig/serverconfig_test.go b/pkg/serverconfig/serverconfig_test.go index 78f5b61c6..8ba61a0c8 100644 --- a/pkg/serverconfig/serverconfig_test.go +++ b/pkg/serverconfig/serverconfig_test.go @@ -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) }