diff --git a/agent/consul/state/catalog_test.go b/agent/consul/state/catalog_test.go index f7e319be3e..183de2e80b 100644 --- a/agent/consul/state/catalog_test.go +++ b/agent/consul/state/catalog_test.go @@ -543,7 +543,7 @@ func deprecatedEnsureNodeWithoutIDCanRegister(t *testing.T, s *Store, nodeName s Node: nodeName, Address: "1.1.1.9", Meta: map[string]string{ - "version": string(txIdx), + "version": fmt.Sprint(txIdx), }, } if err := s.EnsureNode(txIdx, in); err != nil { diff --git a/agent/consul/state/state_store_test.go b/agent/consul/state/state_store_test.go index 2c418af1ca..c522fc0fe8 100644 --- a/agent/consul/state/state_store_test.go +++ b/agent/consul/state/state_store_test.go @@ -65,7 +65,7 @@ func testRegisterNode(t *testing.T, s *Store, idx uint64, nodeID string) { // testRegisterNodeWithChange registers a node and ensures it gets different from previous registration func testRegisterNodeWithChange(t *testing.T, s *Store, idx uint64, nodeID string) { testRegisterNodeWithMeta(t, s, idx, nodeID, map[string]string{ - "version": string(idx), + "version": fmt.Sprint(idx), }) } @@ -92,7 +92,7 @@ func testRegisterNodeWithMeta(t *testing.T, s *Store, idx uint64, nodeID string, func testRegisterServiceWithChange(t *testing.T, s *Store, idx uint64, nodeID, serviceID string, modifyAccordingIndex bool) { meta := make(map[string]string) if modifyAccordingIndex { - meta["version"] = string(idx) + meta["version"] = fmt.Sprint(idx) } svc := &structs.NodeService{ ID: serviceID, diff --git a/agent/structs/structs_test.go b/agent/structs/structs_test.go index 2d3bc9b8f7..a9c75bca00 100644 --- a/agent/structs/structs_test.go +++ b/agent/structs/structs_test.go @@ -1315,7 +1315,7 @@ func TestStructs_DirEntry_Clone(t *testing.T) { func TestStructs_ValidateServiceAndNodeMetadata(t *testing.T) { tooMuchMeta := make(map[string]string) for i := 0; i < metaMaxKeyPairs+1; i++ { - tooMuchMeta[string(i)] = "value" + tooMuchMeta[fmt.Sprint(i)] = "value" } type testcase struct { Meta map[string]string