aboutsummaryrefslogtreecommitdiffstats
path: root/api/vppapi_errors_test.go
blob: 78e1fbf8e0e7af80430097cc354b2f3b926d7a1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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"))
}