Skip to content

Commit

Permalink
Update expected encoding in test
Browse files Browse the repository at this point in the history
go-memdb was updated in v1.3.3 to make integers in indexes sortable, which changed how integers were encoded.
  • Loading branch information
Chris S. Kim committed Oct 20, 2022
1 parent f2209b2 commit a7ea261
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion agent/consul/state/catalog_oss_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package state

import (
"net"
"strconv"

"github.com/hashicorp/consul/acl"
"github.com/hashicorp/consul/agent/structs"
Expand Down Expand Up @@ -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{
Expand Down

0 comments on commit a7ea261

Please sign in to comment.