Update expected encoding in test

go-memdb was updated in v1.3.3 to make integers in indexes sortable, which changed how integers were encoded.
This commit is contained in:
Chris S. Kim 2022-10-20 11:45:15 -04:00
parent f2209b2fbe
commit a7ea26192b
1 changed files with 6 additions and 1 deletions

View File

@ -5,6 +5,7 @@ package state
import (
"net"
"strconv"
"github.com/hashicorp/consul/acl"
"github.com/hashicorp/consul/agent/structs"
@ -226,7 +227,11 @@ func testIndexerTableGatewayServices() map[string]indexerTestCase {
Service: structs.ServiceName{Name: "SerVice"},
Port: 50123,
}
encodedPort := string([]byte{0x96, 0x8f, 0x06, 0, 0, 0, 0, 0, 0, 0})
encodedPort := string([]byte{0x80, 0, 0, 0, 0, 0, 0xc3, 0xcb})
// On 32-bit systems the int encoding will be different
if strconv.IntSize == 32 {
encodedPort = string([]byte{0x80, 0, 0xc3, 0xcb})
}
return map[string]indexerTestCase{
indexID: {
read: indexValue{