diff --git a/chk/chk.go b/chk/chk.go index ed3d0de6..e00403ba 100644 --- a/chk/chk.go +++ b/chk/chk.go @@ -133,7 +133,7 @@ func HasResult(t testing.TB, res []*client.OpResult, want *client.OpResult, opt for _, r := range res { buf.WriteString(fmt.Sprintf("\t%s\n", r)) } - t.Fatalf(buf.String()) + t.Fatal(buf.String()) } } diff --git a/compliance/compliance.go b/compliance/compliance.go index a316b038..4636023e 100644 --- a/compliance/compliance.go +++ b/compliance/compliance.go @@ -368,8 +368,9 @@ var ( }, }, { In: Test{ - Fn: makeTestWithACK(GetIPv6, fluent.InstalledInRIB), - ShortName: "Get for installed IPv6 Entry - RIB ACK", + Fn: makeTestWithACK(GetIPv6, fluent.InstalledInRIB), + ShortName: "Get for installed IPv6 Entry - RIB ACK", + RequiresIPv6: true, }, }, { In: Test{ @@ -404,6 +405,7 @@ var ( Fn: makeTestWithACK(GetIPv6, fluent.InstalledInFIB), ShortName: "Get for installed IPv6 Entry - FIB ACK", RequiresFIBACK: true, + RequiresIPv6: true, }, }, { In: Test{ diff --git a/rib/rib_test.go b/rib/rib_test.go index 321a9297..cf26144b 100644 --- a/rib/rib_test.go +++ b/rib/rib_test.go @@ -2558,7 +2558,7 @@ func TestRIBAddEntry(t *testing.T) { inRIB: func() *RIB { r := New(defName) if err := r.AddNetworkInstance("VRF-1"); err != nil { - t.Fatalf(fmt.Sprintf("cannot add network instance, %v", err)) + t.Fatalf("cannot add network instance, %v", err) } _, fails, err := r.AddEntry(defName, &spb.AFTOperation{ @@ -2571,7 +2571,7 @@ func TestRIBAddEntry(t *testing.T) { }, }) if err != nil || len(fails) != 0 { - t.Fatalf(fmt.Sprintf("cannot build test case, cannot add NH, got: %v or failed ops %d", err, len(fails))) + t.Fatalf("cannot build test case, cannot add NH, got: %v or failed ops %d", err, len(fails)) } _, fails, err = r.AddEntry(defName, &spb.AFTOperation{ diff --git a/server/server.go b/server/server.go index c77eecae..bbf15772 100644 --- a/server/server.go +++ b/server/server.go @@ -364,6 +364,8 @@ func (s *Server) Modify(ms spb.GRIBI_ModifyServer) error { return } + // update that we have received at least one message, to detect that we cannot + // now re-set the parameters of the RPC. gotmsg = true // write the results to result channel. if !skipWrite { @@ -377,7 +379,6 @@ func (s *Server) Modify(ms spb.GRIBI_ModifyServer) error { for { select { case res := <-resultChan: - // update that we have received at least one message. if err := ms.Send(res); err != nil { errCh <- status.Errorf(codes.Internal, "cannot write message to client channel, %s", res) return diff --git a/server/server_test.go b/server/server_test.go index 0136d45e..597e55e5 100644 --- a/server/server_test.go +++ b/server/server_test.go @@ -456,7 +456,7 @@ func TestCheckParams(t *testing.T) { } if errS := chkErrDetails(st, tt.wantErrDetails); errS != "" { - t.Fatalf(errS) + t.Fatal(errS) } return @@ -659,7 +659,7 @@ func TestRunElection(t *testing.T) { } if errS := chkErrDetails(st, tt.wantErrDetails); errS != "" { - t.Fatalf(errS) + t.Fatal(errS) } return