mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
fix S1019 use of make
Signed-off-by: Ken Sipe <kensipe@gmail.com>
This commit is contained in:
parent
a549d0a75e
commit
a4d05d51d9
@ -139,7 +139,7 @@ func TestWatchCacheBasic(t *testing.T) {
|
|||||||
"prefix/ns/pod2": *makeTestStoreElement(makeTestPod("pod2", 5)),
|
"prefix/ns/pod2": *makeTestStoreElement(makeTestPod("pod2", 5)),
|
||||||
"prefix/ns/pod3": *makeTestStoreElement(makeTestPod("pod3", 6)),
|
"prefix/ns/pod3": *makeTestStoreElement(makeTestPod("pod3", 6)),
|
||||||
}
|
}
|
||||||
items := make(map[string]storeElement, 0)
|
items := make(map[string]storeElement)
|
||||||
for _, item := range store.List() {
|
for _, item := range store.List() {
|
||||||
elem := item.(*storeElement)
|
elem := item.(*storeElement)
|
||||||
items[elem.Key] = *elem
|
items[elem.Key] = *elem
|
||||||
|
@ -277,7 +277,7 @@ func TestDealer_DealIntoHand(t *testing.T) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size: 6 cap: 6 slice",
|
"size: 6 cap: 6 slice",
|
||||||
make([]int, 6, 6),
|
make([]int, 6),
|
||||||
6,
|
6,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -287,7 +287,7 @@ func TestDealer_DealIntoHand(t *testing.T) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size: 4 cap: 4 slice",
|
"size: 4 cap: 4 slice",
|
||||||
make([]int, 4, 4),
|
make([]int, 4),
|
||||||
6,
|
6,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -297,7 +297,7 @@ func TestDealer_DealIntoHand(t *testing.T) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size: 10 cap: 10 slice",
|
"size: 10 cap: 10 slice",
|
||||||
make([]int, 10, 10),
|
make([]int, 10),
|
||||||
6,
|
6,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -238,7 +238,7 @@ func TestVersionedConn(t *testing.T) {
|
|||||||
conn := NewConn(supportedProtocols)
|
conn := NewConn(supportedProtocols)
|
||||||
// note that it's not enough to wait for conn.ready to avoid a race here. Hence,
|
// note that it's not enough to wait for conn.ready to avoid a race here. Hence,
|
||||||
// we use a channel.
|
// we use a channel.
|
||||||
selectedProtocol := make(chan string, 0)
|
selectedProtocol := make(chan string)
|
||||||
s, addr := newServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
|
s, addr := newServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
|
||||||
p, _, _ := conn.Open(w, req)
|
p, _, _ := conn.Open(w, req)
|
||||||
selectedProtocol <- p
|
selectedProtocol <- p
|
||||||
|
Loading…
Reference in New Issue
Block a user