aboutsummaryrefslogtreecommitdiffstats
path: root/api/errors_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'api/errors_test.go')
-rw-r--r--api/errors_test.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/api/errors_test.go b/api/errors_test.go
new file mode 100644
index 0000000..78e1fbf
--- /dev/null
+++ b/api/errors_test.go
@@ -0,0 +1,23 @@
+package api
+
+import (
+ "testing"
+
+ . "github.com/onsi/gomega"
+)
+
+func TestUnspecified(t *testing.T) {
+ RegisterTestingT(t)
+
+ var err error = VPPApiError(-1)
+ errstr := err.Error()
+ Expect(errstr).Should(BeEquivalentTo("VPPApiError: Unspecified Error (-1)"))
+}
+
+func TestUnknown(t *testing.T) {
+ RegisterTestingT(t)
+
+ var err error = VPPApiError(-999)
+ errstr := err.Error()
+ Expect(errstr).Should(BeEquivalentTo("VPPApiError: -999"))
+}