From 80cbc184c3ebc6424057a9b8cddcc0e86cd29d43 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Wed, 13 Jan 2021 15:57:06 +0100 Subject: Have the configuration loadFile function return a pointer --- config/config_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'config/config_test.go') diff --git a/config/config_test.go b/config/config_test.go index 2bc5489..74c7996 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -50,8 +50,8 @@ func TestLoadFile(t *testing.T) { }, }, } - if config, err := LoadFile("test_data/minimal.yaml"); err != nil || !reflect.DeepEqual(want, config) { - t.Fatalf("minimal example failed:\nerror %v\nwant:%+v\ngot: %+v", err, want, config) + if config, err := LoadFile("test_data/minimal.yaml"); err != nil || !reflect.DeepEqual(want, *config) { + t.Fatalf("minimal example failed:\nerror %v\nwant:%+v\ngot: %+v", err, want, *config) } t.Cleanup(func() { os.RemoveAll("var/") }) @@ -215,7 +215,7 @@ func TestLoadFile(t *testing.T) { }, }, } - if config, err := LoadFile("../example/complete.yaml"); err != nil || !reflect.DeepEqual(want, config) { - t.Fatalf("complete example failed:\nerror %v\nwant:%+v\ngot: %+v", err, want, config) + if config, err := LoadFile("../example/complete.yaml"); err != nil || !reflect.DeepEqual(want, *config) { + t.Fatalf("complete example failed:\nerror %v\nwant:%+v\ngot: %+v", err, want, *config) } } -- cgit v1.2.3