kversion test: fixup
The max verison tested needs to keep being bumped (probably not a good
test)
The raft bit is out of date and harder to keep track of, so deleted.
@@ -70,38 +70,11 @@ func TestVersionGuess(t *testing.T) {
{
v := Tip()
v.SetMaxKeyVersion(0, 999)
- if got, exp := v.VersionGuess(), "at least v2.7"; got != exp {
+ if got, exp := v.VersionGuess(), "at least v3.1"; got != exp {
t.Errorf("got %s != exp %s without modifications", got, exp)
}
}
- { // This is a very specific test to trigger the Raft controller on v2.7.
- v := new(Versions)
- v.SetMaxKeyVersion(1, 12)
- v.SetMaxKeyVersion(3, 9)
- v.SetMaxKeyVersion(7, 3)
- v.SetMaxKeyVersion(17, 1)
- v.SetMaxKeyVersion(18, 3)
- v.SetMaxKeyVersion(19, 6)
- v.SetMaxKeyVersion(20, 5)
- v.SetMaxKeyVersion(36, 2)
- v.SetMaxKeyVersion(44, 1)
- v.SetMaxKeyVersion(49, 0)
- v.SetMaxKeyVersion(52, 0)
- v.SetMaxKeyVersion(53, 0)
- v.SetMaxKeyVersion(54, 0)
- v.SetMaxKeyVersion(55, 0)
- v.SetMaxKeyVersion(56, 0)
-
- if got, exp := v.VersionGuess(), "unknown custom version"; got != exp {
- t.Errorf("got %s != exp %s for raft controller v2.7", got, exp)
- }
-
- if got, exp := v.VersionGuess(TryRaftController()), "v2.7"; got != exp {
- t.Errorf("got %s != exp %s for trying as raft controller v2.7", got, exp)
- }
- }
-
{ // Here, we ensure we skip 4, 5, 6, and 7 by default.
v := V2_7_0()
v.SetMaxKeyVersion(4, -1)
