From ac4c291f760826d8c9a47df2e3982cc83a60bd10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20Trma=C4=8D?= Date: Wed, 16 Mar 2022 15:13:31 +0100 Subject: [PATCH] Use assert.ErrorContains MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ...added in github.com/stretchr/testify 1.7.1. Signed-off-by: Miloslav Trmač --- cmd/skopeo/signing_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/skopeo/signing_test.go b/cmd/skopeo/signing_test.go index f9003090..552e7321 100644 --- a/cmd/skopeo/signing_test.go +++ b/cmd/skopeo/signing_test.go @@ -25,9 +25,8 @@ const ( // Test that results of runSkopeo failed with nothing on stdout, and substring // within the error message. func assertTestFailed(t *testing.T, stdout string, err error, substring string) { - assert.Error(t, err) + assert.ErrorContains(t, err, substring) assert.Empty(t, stdout) - assert.Contains(t, err.Error(), substring) } func TestStandaloneSign(t *testing.T) {