summaryrefslogtreecommitdiffstats
path: root/common/herrors/errors_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'common/herrors/errors_test.go')
-rw-r--r--common/herrors/errors_test.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/common/herrors/errors_test.go b/common/herrors/errors_test.go
index 1e0730028..223782e23 100644
--- a/common/herrors/errors_test.go
+++ b/common/herrors/errors_test.go
@@ -14,6 +14,7 @@
package herrors
import (
+ "errors"
"fmt"
"testing"
@@ -34,3 +35,12 @@ func TestIsNotExist(t *testing.T) {
// os.IsNotExist returns false for wrapped errors.
c.Assert(IsNotExist(fmt.Errorf("foo: %w", afero.ErrFileNotFound)), qt.Equals, true)
}
+
+func TestIsFeatureNotAvailableError(t *testing.T) {
+ c := qt.New(t)
+
+ c.Assert(IsFeatureNotAvailableError(ErrFeatureNotAvailable), qt.Equals, true)
+ c.Assert(IsFeatureNotAvailableError(&FeatureNotAvailableError{}), qt.Equals, true)
+ c.Assert(IsFeatureNotAvailableError(errors.New("asdf")), qt.Equals, false)
+
+}