From baac21505a8be922256b7a10d15a89252647aa72 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Thu, 4 Jun 2020 11:30:22 +0200 Subject: [PATCH] Use dummySettings on bundle properties test to simplify test scope --- pkg/proto/v0/settings.pb.micro_test.go | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/pkg/proto/v0/settings.pb.micro_test.go b/pkg/proto/v0/settings.pb.micro_test.go index 4ce38bca39..d8fa07e34e 100644 --- a/pkg/proto/v0/settings.pb.micro_test.go +++ b/pkg/proto/v0/settings.pb.micro_test.go @@ -80,12 +80,7 @@ func TestSettingsBundleProperties(t *testing.T) { "simple-display-name", "simple-extension-name", "123e4567-e89b-12d3-a456-426652340000", - CustomError{ - ID: "go.micro.client", - Code: 500, - Detail: "settings: cannot be blank.", - Status: "Internal Server Error", - }, + CustomError{}, }, { "UTF", @@ -220,12 +215,7 @@ func TestSettingsBundleProperties(t *testing.T) { "simple-display-name", "simple-extension-name", "123e4567-e89b-12d3-a456-426652340000", - CustomError{ - ID: "go.micro.client", - Code: 500, - Detail: "settings: cannot be blank.", - Status: "Internal Server Error", - }, + CustomError{}, }, { "display name missing", @@ -237,7 +227,7 @@ func TestSettingsBundleProperties(t *testing.T) { CustomError{ ID: "go.micro.client", Code: 500, - Detail: "display_name: cannot be blank; settings: cannot be blank.", + Detail: "display_name: cannot be blank.", Status: "Internal Server Error", }, }, @@ -248,12 +238,7 @@ func TestSettingsBundleProperties(t *testing.T) { "simple-display-name", "simple-extension-name", "", - CustomError{ - ID: "go.micro.client", - Code: 500, - Detail: "settings: cannot be blank.", - Status: "Internal Server Error", - }, + CustomError{}, }, } for _, testCase := range tests { @@ -268,7 +253,7 @@ func TestSettingsBundleProperties(t *testing.T) { bundle := proto.SettingsBundle{ Identifier: &identifier, DisplayName: testCase.DisplayName, - Settings: nil, + Settings: dummySettings, } createRequest := proto.SaveSettingsBundleRequest{ SettingsBundle: &bundle,