Blame SOURCES/0001-Convert-int-to-string-using-strconv.Itoa.patch

62780e
From 80c8dfe084f44eb660aa1af5b5d49e27e1dfd11e Mon Sep 17 00:00:00 2001
62780e
From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@gmail.com>
62780e
Date: Mon, 10 Aug 2020 15:09:08 +0200
62780e
Subject: [PATCH] Convert int to string using strconv.Itoa
62780e
MIME-Version: 1.0
62780e
Content-Type: text/plain; charset=UTF-8
62780e
Content-Transfer-Encoding: 8bit
62780e
62780e
See https://github.com/golang/go/issues/32479
62780e
62780e
Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
62780e
---
62780e
 etcdserver/api/v2store/store_test.go | 3 ++-
62780e
 wal/wal_test.go                      | 3 ++-
62780e
 2 files changed, 4 insertions(+), 2 deletions(-)
62780e
62780e
diff --git a/etcdserver/api/v2store/store_test.go b/etcdserver/api/v2store/store_test.go
62780e
index 76ec02d4e..0b1e9dad1 100644
62780e
--- a/etcdserver/api/v2store/store_test.go
62780e
+++ b/etcdserver/api/v2store/store_test.go
62780e
@@ -15,6 +15,7 @@
62780e
 package v2store_test
62780e
 
62780e
 import (
62780e
+	"strconv"
62780e
 	"testing"
62780e
 	"time"
62780e
 
62780e
@@ -844,7 +845,7 @@ func TestStoreWatchSlowConsumer(t *testing.T) {
62780e
 	s.Watch("/foo", true, true, 0) // stream must be true
62780e
 	// Fill watch channel with 100 events
62780e
 	for i := 1; i <= 100; i++ {
62780e
-		s.Set("/foo", false, string(i), v2store.TTLOptionSet{ExpireTime: v2store.Permanent}) // ok
62780e
+		s.Set("/foo", false, strconv.Itoa(i), v2store.TTLOptionSet{ExpireTime: v2store.Permanent}) // ok
62780e
 	}
62780e
 	// testutil.AssertEqual(t, s.WatcherHub.count, int64(1))
62780e
 	s.Set("/foo", false, "101", v2store.TTLOptionSet{ExpireTime: v2store.Permanent}) // ok
62780e
diff --git a/wal/wal_test.go b/wal/wal_test.go
62780e
index f457dbf3c..8e8a252a0 100644
62780e
--- a/wal/wal_test.go
62780e
+++ b/wal/wal_test.go
62780e
@@ -25,6 +25,7 @@ import (
62780e
 	"path/filepath"
62780e
 	"reflect"
62780e
 	"regexp"
62780e
+	"strconv"
62780e
 	"testing"
62780e
 
62780e
 	"go.etcd.io/etcd/pkg/fileutil"
62780e
@@ -239,7 +240,7 @@ func TestVerify(t *testing.T) {
62780e
 
62780e
 	// make 5 separate files
62780e
 	for i := 0; i < 5; i++ {
62780e
-		es := []raftpb.Entry{{Index: uint64(i), Data: []byte("waldata" + string(i+1))}}
62780e
+		es := []raftpb.Entry{{Index: uint64(i), Data: []byte("waldata" + strconv.Itoa(i+1))}}
62780e
 		if err = w.Save(raftpb.HardState{}, es); err != nil {
62780e
 			t.Fatal(err)
62780e
 		}
62780e
-- 
62780e
2.26.2
62780e