Skip to content

Commit

Permalink
[main] Format Go code (#7218)
Browse files Browse the repository at this point in the history
Format go code

Signed-off-by: Knative Automation <[email protected]>
  • Loading branch information
knative-automation authored Sep 1, 2023
1 parent 10e25b9 commit 11d9e8a
Showing 1 changed file with 42 additions and 42 deletions.
84 changes: 42 additions & 42 deletions pkg/scheduler/state/state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit 11d9e8a

Please sign in to comment.