openconfig / gribigo

Go implementation of gRIBI.
Apache License 2.0
16 stars 24 forks source link

Election test TestUnsupportedElectionParams() is expecting the incorrect reason code #125

Closed jeremyrandnokia closed 2 years ago

jeremyrandnokia commented 2 years ago

In this test, an election id is sent in all primary mode. According to the gribi.proto file:

    // If the server is currently operating in ALL_PRIMARY mode the server
    // should return an error specifying ELECTION_ID_IN_ALL_PRIMARY reason. The
    // status (canonical error code) should be FAILED_PRECONDITION.

But the test is currently expecting fluent.ParamsDifferFromOtherClients. Shouldn't this be fluent.ElectionIDNotAllowed?

robshakir commented 2 years ago

Thanks for catching this, yes -- this looks to be a copy&paste error. Will submit a fix.