From ffe99fad3e2333c10a81f01d6b764cdcc7e37835 Mon Sep 17 00:00:00 2001 From: chrislu Date: Thu, 6 Nov 2025 22:46:57 -0800 Subject: [PATCH] error checking --- weed/filer/foundationdb/foundationdb_store_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/weed/filer/foundationdb/foundationdb_store_test.go b/weed/filer/foundationdb/foundationdb_store_test.go index 5712bdb87..cbae2afa3 100644 --- a/weed/filer/foundationdb/foundationdb_store_test.go +++ b/weed/filer/foundationdb/foundationdb_store_test.go @@ -5,6 +5,7 @@ package foundationdb import ( "context" + "errors" "fmt" "os" "strings" @@ -174,7 +175,7 @@ func TestFoundationDBStore_ErrorHandling(t *testing.T) { if err == nil { t.Error("Expected error for non-existent file") } - if err != filer_pb.ErrNotFound { + if !errors.Is(err, filer_pb.ErrNotFound) { t.Errorf("Expected ErrNotFound, got %v", err) } @@ -183,7 +184,7 @@ func TestFoundationDBStore_ErrorHandling(t *testing.T) { if err == nil { t.Error("Expected error for non-existent key") } - if err != filer.ErrKvNotFound { + if !errors.Is(err, filer.ErrKvNotFound) { t.Errorf("Expected ErrKvNotFound, got %v", err) }