Files
releases/v1/storage/errors_test.go
Johan Fylling 7bb6dbe36b Preparing for v1 API
Moving (most) source to v1 root package to prepare for v0/v1 API separation.

Signed-off-by: Johan Fylling <johan.dev@fylling.se>
2024-12-12 15:09:03 +01:00

28 lines
514 B
Go

// Copyright 2016 The OPA Authors. All rights reserved.
// Use of this source code is governed by an Apache2
// license that can be found in the LICENSE file.
package storage
import "testing"
func TestIsNotFound(t *testing.T) {
err1 := &Error{
Code: NotFoundErr,
Message: "",
}
err2 := &Error{
Code: InternalErr,
Message: "",
}
if !IsNotFound(err1) {
t.Errorf("Expected err1 to be not found error")
}
if IsNotFound(err2) {
t.Errorf("Did not expect err2 to be not found error")
}
}