Browse Source

error checking

pull/7178/head
chrislu 4 weeks ago
parent
commit
ffe99fad3e
  1. 5
      weed/filer/foundationdb/foundationdb_store_test.go

5
weed/filer/foundationdb/foundationdb_store_test.go

@ -5,6 +5,7 @@ package foundationdb
import ( import (
"context" "context"
"errors"
"fmt" "fmt"
"os" "os"
"strings" "strings"
@ -174,7 +175,7 @@ func TestFoundationDBStore_ErrorHandling(t *testing.T) {
if err == nil { if err == nil {
t.Error("Expected error for non-existent file") 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) t.Errorf("Expected ErrNotFound, got %v", err)
} }
@ -183,7 +184,7 @@ func TestFoundationDBStore_ErrorHandling(t *testing.T) {
if err == nil { if err == nil {
t.Error("Expected error for non-existent key") 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) t.Errorf("Expected ErrKvNotFound, got %v", err)
} }

Loading…
Cancel
Save