From 11d9e8ad8b24cb9fcf3600ed3a97daa58d4b583e Mon Sep 17 00:00:00 2001 From: Knative Automation Date: Fri, 1 Sep 2023 06:01:35 +0100 Subject: [PATCH] [main] Format Go code (#7218) Format go code Signed-off-by: Knative Automation --- pkg/scheduler/state/state_test.go | 84 +++++++++++++++---------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/pkg/scheduler/state/state_test.go b/pkg/scheduler/state/state_test.go index 60c72b1db1f..7244eea2bf9 100644 --- a/pkg/scheduler/state/state_test.go +++ b/pkg/scheduler/state/state_test.go @@ -88,10 +88,10 @@ func TestStateBuilder(t *testing.T) { }, }, Pending: map[types.NamespacedName]int32{ - types.NamespacedName{Name: "vpod-name-0", Namespace: "vpod-ns-0"}: 0, + {Name: "vpod-name-0", Namespace: "vpod-ns-0"}: 0, }, ExpectedVReplicaByVPod: map[types.NamespacedName]int32{ - types.NamespacedName{Name: "vpod-name-0", Namespace: "vpod-ns-0"}: 1, + {Name: "vpod-name-0", Namespace: "vpod-ns-0"}: 1, }, }, freec: int32(9), @@ -148,14 +148,14 @@ func TestStateBuilder(t *testing.T) { }, }, Pending: map[types.NamespacedName]int32{ - types.NamespacedName{Name: "vpod-name-0", Namespace: "vpod-ns-0"}: 0, - types.NamespacedName{Name: "vpod-name-1", Namespace: "vpod-ns-1"}: 0, - types.NamespacedName{Name: "vpod-name-2", Namespace: "vpod-ns-2"}: 0, + {Name: "vpod-name-0", Namespace: "vpod-ns-0"}: 0, + {Name: "vpod-name-1", Namespace: "vpod-ns-1"}: 0, + {Name: "vpod-name-2", Namespace: "vpod-ns-2"}: 0, }, ExpectedVReplicaByVPod: map[types.NamespacedName]int32{ - types.NamespacedName{Name: "vpod-name-0", Namespace: "vpod-ns-0"}: 1, - types.NamespacedName{Name: "vpod-name-1", Namespace: "vpod-ns-1"}: 1, - types.NamespacedName{Name: "vpod-name-2", Namespace: "vpod-ns-2"}: 1, + {Name: "vpod-name-0", Namespace: "vpod-ns-0"}: 1, + {Name: "vpod-name-1", Namespace: "vpod-ns-1"}: 1, + {Name: "vpod-name-2", Namespace: "vpod-ns-2"}: 1, }, }, freec: int32(18), @@ -207,14 +207,14 @@ func TestStateBuilder(t *testing.T) { }, }, Pending: map[types.NamespacedName]int32{ - types.NamespacedName{Name: "vpod-name-0", Namespace: "vpod-ns-0"}: 0, - types.NamespacedName{Name: "vpod-name-1", Namespace: "vpod-ns-1"}: 0, - types.NamespacedName{Name: "vpod-name-2", Namespace: "vpod-ns-2"}: 0, + {Name: "vpod-name-0", Namespace: "vpod-ns-0"}: 0, + {Name: "vpod-name-1", Namespace: "vpod-ns-1"}: 0, + {Name: "vpod-name-2", Namespace: "vpod-ns-2"}: 0, }, ExpectedVReplicaByVPod: map[types.NamespacedName]int32{ - types.NamespacedName{Name: "vpod-name-0", Namespace: "vpod-ns-0"}: 1, - types.NamespacedName{Name: "vpod-name-1", Namespace: "vpod-ns-1"}: 1, - types.NamespacedName{Name: "vpod-name-2", Namespace: "vpod-ns-2"}: 1, + {Name: "vpod-name-0", Namespace: "vpod-ns-0"}: 1, + {Name: "vpod-name-1", Namespace: "vpod-ns-1"}: 1, + {Name: "vpod-name-2", Namespace: "vpod-ns-2"}: 1, }, }, freec: int32(10), @@ -271,14 +271,14 @@ func TestStateBuilder(t *testing.T) { }, }, Pending: map[types.NamespacedName]int32{ - types.NamespacedName{Name: "vpod-name-0", Namespace: "vpod-ns-0"}: 0, - types.NamespacedName{Name: "vpod-name-1", Namespace: "vpod-ns-1"}: 1, - types.NamespacedName{Name: "vpod-name-2", Namespace: "vpod-ns-2"}: 1, + {Name: "vpod-name-0", Namespace: "vpod-ns-0"}: 0, + {Name: "vpod-name-1", Namespace: "vpod-ns-1"}: 1, + {Name: "vpod-name-2", Namespace: "vpod-ns-2"}: 1, }, ExpectedVReplicaByVPod: map[types.NamespacedName]int32{ - types.NamespacedName{Name: "vpod-name-0", Namespace: "vpod-ns-0"}: 1, - types.NamespacedName{Name: "vpod-name-1", Namespace: "vpod-ns-1"}: 1, - types.NamespacedName{Name: "vpod-name-2", Namespace: "vpod-ns-2"}: 1, + {Name: "vpod-name-0", Namespace: "vpod-ns-0"}: 1, + {Name: "vpod-name-1", Namespace: "vpod-ns-1"}: 1, + {Name: "vpod-name-2", Namespace: "vpod-ns-2"}: 1, }, }, freec: int32(34), @@ -335,14 +335,14 @@ func TestStateBuilder(t *testing.T) { }, }, Pending: map[types.NamespacedName]int32{ - types.NamespacedName{Name: "vpod-name-0", Namespace: "vpod-ns-0"}: 0, - types.NamespacedName{Name: "vpod-name-1", Namespace: "vpod-ns-1"}: 1, - types.NamespacedName{Name: "vpod-name-2", Namespace: "vpod-ns-2"}: 1, + {Name: "vpod-name-0", Namespace: "vpod-ns-0"}: 0, + {Name: "vpod-name-1", Namespace: "vpod-ns-1"}: 1, + {Name: "vpod-name-2", Namespace: "vpod-ns-2"}: 1, }, ExpectedVReplicaByVPod: map[types.NamespacedName]int32{ - types.NamespacedName{Name: "vpod-name-0", Namespace: "vpod-ns-0"}: 1, - types.NamespacedName{Name: "vpod-name-1", Namespace: "vpod-ns-1"}: 1, - types.NamespacedName{Name: "vpod-name-2", Namespace: "vpod-ns-2"}: 1, + {Name: "vpod-name-0", Namespace: "vpod-ns-0"}: 1, + {Name: "vpod-name-1", Namespace: "vpod-ns-1"}: 1, + {Name: "vpod-name-2", Namespace: "vpod-ns-2"}: 1, }, }, freec: int32(28), @@ -408,14 +408,14 @@ func TestStateBuilder(t *testing.T) { }, }, Pending: map[types.NamespacedName]int32{ - types.NamespacedName{Name: "vpod-name-0", Namespace: "vpod-ns-0"}: 0, - types.NamespacedName{Name: "vpod-name-1", Namespace: "vpod-ns-1"}: 1, - types.NamespacedName{Name: "vpod-name-2", Namespace: "vpod-ns-2"}: 1, + {Name: "vpod-name-0", Namespace: "vpod-ns-0"}: 0, + {Name: "vpod-name-1", Namespace: "vpod-ns-1"}: 1, + {Name: "vpod-name-2", Namespace: "vpod-ns-2"}: 1, }, ExpectedVReplicaByVPod: map[types.NamespacedName]int32{ - types.NamespacedName{Name: "vpod-name-0", Namespace: "vpod-ns-0"}: 1, - types.NamespacedName{Name: "vpod-name-1", Namespace: "vpod-ns-1"}: 1, - types.NamespacedName{Name: "vpod-name-2", Namespace: "vpod-ns-2"}: 1, + {Name: "vpod-name-0", Namespace: "vpod-ns-0"}: 1, + {Name: "vpod-name-1", Namespace: "vpod-ns-1"}: 1, + {Name: "vpod-name-2", Namespace: "vpod-ns-2"}: 1, }, }, freec: int32(26), @@ -484,14 +484,14 @@ func TestStateBuilder(t *testing.T) { }, }, Pending: map[types.NamespacedName]int32{ - types.NamespacedName{Name: "vpod-name-0", Namespace: "vpod-ns-0"}: 0, - types.NamespacedName{Name: "vpod-name-1", Namespace: "vpod-ns-1"}: 1, - types.NamespacedName{Name: "vpod-name-2", Namespace: "vpod-ns-2"}: 1, + {Name: "vpod-name-0", Namespace: "vpod-ns-0"}: 0, + {Name: "vpod-name-1", Namespace: "vpod-ns-1"}: 1, + {Name: "vpod-name-2", Namespace: "vpod-ns-2"}: 1, }, ExpectedVReplicaByVPod: map[types.NamespacedName]int32{ - types.NamespacedName{Name: "vpod-name-0", Namespace: "vpod-ns-0"}: 1, - types.NamespacedName{Name: "vpod-name-1", Namespace: "vpod-ns-1"}: 1, - types.NamespacedName{Name: "vpod-name-2", Namespace: "vpod-ns-2"}: 1, + {Name: "vpod-name-0", Namespace: "vpod-ns-0"}: 1, + {Name: "vpod-name-1", Namespace: "vpod-ns-1"}: 1, + {Name: "vpod-name-2", Namespace: "vpod-ns-2"}: 1, }, }, freec: int32(28), @@ -529,10 +529,10 @@ func TestStateBuilder(t *testing.T) { }, }, Pending: map[types.NamespacedName]int32{ - types.NamespacedName{Name: "vpod-name-0", Namespace: "vpod-ns-0"}: 0, + {Name: "vpod-name-0", Namespace: "vpod-ns-0"}: 0, }, ExpectedVReplicaByVPod: map[types.NamespacedName]int32{ - types.NamespacedName{Name: "vpod-name-0", Namespace: "vpod-ns-0"}: 1, + {Name: "vpod-name-0", Namespace: "vpod-ns-0"}: 1, }, }, freec: int32(9), @@ -561,10 +561,10 @@ func TestStateBuilder(t *testing.T) { }, }, Pending: map[types.NamespacedName]int32{ - types.NamespacedName{Name: "vpod-name-0", Namespace: "vpod-ns-0"}: 0, + {Name: "vpod-name-0", Namespace: "vpod-ns-0"}: 0, }, ExpectedVReplicaByVPod: map[types.NamespacedName]int32{ - types.NamespacedName{Name: "vpod-name-0", Namespace: "vpod-ns-0"}: 1, + {Name: "vpod-name-0", Namespace: "vpod-ns-0"}: 1, }, }, freec: int32(9),