diff options
author | Ondrej Fabry <ofabry@cisco.com> | 2020-06-25 11:55:58 +0200 |
---|---|---|
committer | Ondrej Fabry <ofabry@cisco.com> | 2020-06-25 11:55:58 +0200 |
commit | df67791c6ffc96331f75aec7d3addfe2efca7739 (patch) | |
tree | 8da8dbda17146df62064737a86f5b46aec049a4d /api/errors_test.go | |
parent | ceed73403bdb61387d04be8b47183e9c4a970749 (diff) |
Introduce Stream - experimental API for low-level access to VPP API
Change-Id: I2698e11b76ff55d9730b47d4fee990be93349516
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Diffstat (limited to 'api/errors_test.go')
-rw-r--r-- | api/errors_test.go | 23 |
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")) +} |