From e33bc48752c35bf3ac4a86e904732aac4527887b Mon Sep 17 00:00:00 2001 From: Arash Deshmeh Date: Wed, 21 Feb 2018 17:02:38 -0500 Subject: [PATCH] Added error message check to TestMandatoryVariableErrors test Signed-off-by: Arash Deshmeh --- cli/compose/template/template_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cli/compose/template/template_test.go b/cli/compose/template/template_test.go index ce75216dde..66e50124ed 100644 --- a/cli/compose/template/template_test.go +++ b/cli/compose/template/template_test.go @@ -3,6 +3,7 @@ package template import ( "testing" + "github.com/docker/cli/internal/test/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -119,7 +120,8 @@ func TestMandatoryVariableErrors(t *testing.T) { for _, tc := range testCases { _, err := Substitute(tc.template, defaultMapping) assert.Error(t, err) - assert.IsType(t, &InvalidTemplateError{tc.expectedError}, err) + assert.IsType(t, &InvalidTemplateError{}, err) + testutil.ErrorContains(t, err, tc.expectedError) } }