Skip to content

Commit

Permalink
tests(store): fix linter errcheck failure
Browse files Browse the repository at this point in the history
Signed-off-by: Boris Glimcher <[email protected]>
  • Loading branch information
glimchb committed Oct 19, 2023
1 parent 9c6289d commit 2fd5fd6
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 26 deletions.
10 changes: 5 additions & 5 deletions pkg/evpn/bridge_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ func Test_CreateLogicalBridge(t *testing.T) {
client := pb.NewLogicalBridgeServiceClient(conn)

if tt.exist {
opi.store.Set(testLogicalBridgeName, &testLogicalBridgeWithStatus)
_ = opi.store.Set(testLogicalBridgeName, &testLogicalBridgeWithStatus)
}
if tt.out != nil {
tt.out = protoClone(tt.out)
Expand Down Expand Up @@ -450,7 +450,7 @@ func Test_DeleteLogicalBridge(t *testing.T) {
client := pb.NewLogicalBridgeServiceClient(conn)

fname1 := resourceIDToFullName("bridges", tt.in)
opi.store.Set(testLogicalBridgeName, &testLogicalBridgeWithStatus)
_ = opi.store.Set(testLogicalBridgeName, &testLogicalBridgeWithStatus)

if tt.on != nil {
tt.on(mockNetlink, mockFrr, tt.errMsg)
Expand Down Expand Up @@ -544,7 +544,7 @@ func Test_UpdateLogicalBridge(t *testing.T) {
client := pb.NewLogicalBridgeServiceClient(conn)

if tt.exist {
opi.store.Set(testLogicalBridgeName, &testLogicalBridgeWithStatus)
_ = opi.store.Set(testLogicalBridgeName, &testLogicalBridgeWithStatus)
}
if tt.out != nil {
tt.out = protoClone(tt.out)
Expand Down Expand Up @@ -627,7 +627,7 @@ func Test_GetLogicalBridge(t *testing.T) {
}(conn)
client := pb.NewLogicalBridgeServiceClient(conn)

opi.store.Set(testLogicalBridgeName, &testLogicalBridgeWithStatus)
_ = opi.store.Set(testLogicalBridgeName, &testLogicalBridgeWithStatus)

request := &pb.GetLogicalBridgeRequest{Name: tt.in}
response, err := client.GetLogicalBridge(ctx, request)
Expand Down Expand Up @@ -734,7 +734,7 @@ func Test_ListLogicalBridges(t *testing.T) {
}(conn)
client := pb.NewLogicalBridgeServiceClient(conn)

opi.store.Set(testLogicalBridgeName, &testLogicalBridgeWithStatus)
_ = opi.store.Set(testLogicalBridgeName, &testLogicalBridgeWithStatus)
opi.ListHelper[testLogicalBridgeName] = false
opi.Pagination["existing-pagination-token"] = 1

Expand Down
14 changes: 7 additions & 7 deletions pkg/evpn/port_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,9 @@ func Test_CreateBridgePort(t *testing.T) {
}(conn)
client := pb.NewBridgePortServiceClient(conn)

opi.store.Set(testLogicalBridgeName, &testLogicalBridgeWithStatus)
_ = opi.store.Set(testLogicalBridgeName, &testLogicalBridgeWithStatus)
if tt.exist {
opi.store.Set(testBridgePortName, &testBridgePortWithStatus)
_ = opi.store.Set(testBridgePortName, &testBridgePortWithStatus)
}
if tt.out != nil {
tt.out = protoClone(tt.out)
Expand Down Expand Up @@ -479,8 +479,8 @@ func Test_DeleteBridgePort(t *testing.T) {
client := pb.NewBridgePortServiceClient(conn)

fname1 := resourceIDToFullName("ports", tt.in)
opi.store.Set(testBridgePortName, &testBridgePortWithStatus)
opi.store.Set(testLogicalBridgeName, &testLogicalBridgeWithStatus)
_ = opi.store.Set(testBridgePortName, &testBridgePortWithStatus)
_ = opi.store.Set(testLogicalBridgeName, &testLogicalBridgeWithStatus)
if tt.on != nil {
tt.on(mockNetlink, mockFrr, tt.errMsg)
}
Expand Down Expand Up @@ -574,7 +574,7 @@ func Test_UpdateBridgePort(t *testing.T) {
client := pb.NewBridgePortServiceClient(conn)

if tt.exist {
opi.store.Set(testBridgePortName, &testBridgePortWithStatus)
_ = opi.store.Set(testBridgePortName, &testBridgePortWithStatus)
}
if tt.out != nil {
tt.out = protoClone(tt.out)
Expand Down Expand Up @@ -657,7 +657,7 @@ func Test_GetBridgePort(t *testing.T) {
}(conn)
client := pb.NewBridgePortServiceClient(conn)

opi.store.Set(testBridgePortName, &testBridgePortWithStatus)
_ = opi.store.Set(testBridgePortName, &testBridgePortWithStatus)

request := &pb.GetBridgePortRequest{Name: tt.in}
response, err := client.GetBridgePort(ctx, request)
Expand Down Expand Up @@ -764,7 +764,7 @@ func Test_ListBridgePorts(t *testing.T) {
}(conn)
client := pb.NewBridgePortServiceClient(conn)

opi.store.Set(testBridgePortName, &testBridgePortWithStatus)
_ = opi.store.Set(testBridgePortName, &testBridgePortWithStatus)
opi.ListHelper[testBridgePortName] = false
opi.Pagination["existing-pagination-token"] = 1

Expand Down
18 changes: 9 additions & 9 deletions pkg/evpn/svi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ func Test_CreateSvi(t *testing.T) {
client := pb.NewSviServiceClient(conn)

if tt.exist {
opi.store.Set(testSviName, &testSviWithStatus)
_ = opi.store.Set(testSviName, &testSviWithStatus)
}
if tt.out != nil {
tt.out = protoClone(tt.out)
Expand All @@ -430,8 +430,8 @@ func Test_CreateSvi(t *testing.T) {
if tt.on != nil {
tt.on(mockNetlink, mockFrr, tt.errMsg)
}
opi.store.Set(testVrfName, &testVrfWithStatus)
opi.store.Set(testLogicalBridgeName, &testLogicalBridgeWithStatus)
_ = opi.store.Set(testVrfName, &testVrfWithStatus)
_ = opi.store.Set(testLogicalBridgeName, &testLogicalBridgeWithStatus)

request := &pb.CreateSviRequest{Svi: tt.in, SviId: tt.id}
response, err := client.CreateSvi(ctx, request)
Expand Down Expand Up @@ -606,9 +606,9 @@ func Test_DeleteSvi(t *testing.T) {
client := pb.NewSviServiceClient(conn)

fname1 := resourceIDToFullName("svis", tt.in)
opi.store.Set(testSviName, &testSviWithStatus)
opi.store.Set(testVrfName, &testVrfWithStatus)
opi.store.Set(testLogicalBridgeName, &testLogicalBridgeWithStatus)
_ = opi.store.Set(testSviName, &testSviWithStatus)
_ = opi.store.Set(testVrfName, &testVrfWithStatus)
_ = opi.store.Set(testLogicalBridgeName, &testLogicalBridgeWithStatus)
if tt.on != nil {
tt.on(mockNetlink, mockFrr, tt.errMsg)
}
Expand Down Expand Up @@ -703,7 +703,7 @@ func Test_UpdateSvi(t *testing.T) {
client := pb.NewSviServiceClient(conn)

if tt.exist {
opi.store.Set(testSviName, &testSviWithStatus)
_ = opi.store.Set(testSviName, &testSviWithStatus)
}
if tt.out != nil {
tt.out = protoClone(tt.out)
Expand Down Expand Up @@ -786,7 +786,7 @@ func Test_GetSvi(t *testing.T) {
}(conn)
client := pb.NewSviServiceClient(conn)

opi.store.Set(testSviName, &testSviWithStatus)
_ = opi.store.Set(testSviName, &testSviWithStatus)

request := &pb.GetSviRequest{Name: tt.in}
response, err := client.GetSvi(ctx, request)
Expand Down Expand Up @@ -893,7 +893,7 @@ func Test_ListSvis(t *testing.T) {
}(conn)
client := pb.NewSviServiceClient(conn)

opi.store.Set(testSviName, &testSviWithStatus)
_ = opi.store.Set(testSviName, &testSviWithStatus)
opi.ListHelper[testSviName] = false
opi.Pagination["existing-pagination-token"] = 1

Expand Down
10 changes: 5 additions & 5 deletions pkg/evpn/vrf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ func Test_CreateVrf(t *testing.T) {
client := pb.NewVrfServiceClient(conn)

if tt.exist {
opi.store.Set(testVrfName, &testVrfWithStatus)
_ = opi.store.Set(testVrfName, &testVrfWithStatus)
}
if tt.out != nil {
tt.out = protoClone(tt.out)
Expand Down Expand Up @@ -644,7 +644,7 @@ func Test_DeleteVrf(t *testing.T) {
client := pb.NewVrfServiceClient(conn)

fname1 := resourceIDToFullName("vrfs", tt.in)
opi.store.Set(testVrfName, &testVrfWithStatus)
_ = opi.store.Set(testVrfName, &testVrfWithStatus)
if tt.on != nil {
tt.on(mockNetlink, mockFrr, tt.errMsg)
}
Expand Down Expand Up @@ -739,7 +739,7 @@ func Test_UpdateVrf(t *testing.T) {
client := pb.NewVrfServiceClient(conn)

if tt.exist {
opi.store.Set(testVrfName, &testVrfWithStatus)
_ = opi.store.Set(testVrfName, &testVrfWithStatus)
}
if tt.out != nil {
tt.out = protoClone(tt.out)
Expand Down Expand Up @@ -822,7 +822,7 @@ func Test_GetVrf(t *testing.T) {
}(conn)
client := pb.NewVrfServiceClient(conn)

opi.store.Set(testVrfName, &testVrfWithStatus)
_ = opi.store.Set(testVrfName, &testVrfWithStatus)

request := &pb.GetVrfRequest{Name: tt.in}
response, err := client.GetVrf(ctx, request)
Expand Down Expand Up @@ -929,7 +929,7 @@ func Test_ListVrfs(t *testing.T) {
}(conn)
client := pb.NewVrfServiceClient(conn)

opi.store.Set(testVrfName, &testVrfWithStatus)
_ = opi.store.Set(testVrfName, &testVrfWithStatus)
opi.ListHelper[testVrfName] = false
opi.Pagination["existing-pagination-token"] = 1

Expand Down

0 comments on commit 2fd5fd6

Please sign in to comment.