From 4230c1ba09a3065c8ba045ea13152605599f8a7e Mon Sep 17 00:00:00 2001 From: lyimmi Date: Sat, 29 Jul 2023 18:59:21 +0200 Subject: [PATCH] =?UTF-8?q?fix=20tests=C5=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- clamd_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/clamd_test.go b/clamd_test.go index d7ce683..a99f4a9 100644 --- a/clamd_test.go +++ b/clamd_test.go @@ -2,6 +2,7 @@ package clamd import ( "context" + "errors" "log" "os" "path" @@ -75,7 +76,7 @@ func TestScan(t *testing.T) { defer os.Remove(tf) got, err := clamd.Scan(context.Background(), tf) - if err != nil { + if err != nil && !errors.Is(err, ErrEICARFound) { t.Errorf("%v", err) } if got { @@ -95,7 +96,7 @@ func TestStream(t *testing.T) { } got, err := clamd.ScanStream(context.Background(), f) - if err != nil { + if err != nil && !errors.Is(err, ErrEICARFound) { t.Errorf("%v", err) } if got { @@ -110,7 +111,7 @@ func TestScanAll(t *testing.T) { defer os.Remove(tf) got, err := clamd.ScanAll(context.Background(), tf) - if err != nil { + if err != nil && !errors.Is(err, ErrEICARFound) { t.Errorf("%v", err) } if got {