From cfeded247b23098f71ffe4438ae769afec402f22 Mon Sep 17 00:00:00 2001 From: Edmund Ochieng Date: Tue, 19 Sep 2023 16:19:39 -0500 Subject: [PATCH] Clean up the slice of conditions Signed-off-by: Edmund Ochieng --- .../ansible/controller/status/utils_test.go | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/internal/ansible/controller/status/utils_test.go b/internal/ansible/controller/status/utils_test.go index 1671dc1..334f086 100644 --- a/internal/ansible/controller/status/utils_test.go +++ b/internal/ansible/controller/status/utils_test.go @@ -96,7 +96,7 @@ func TestGetCondition(t *testing.T) { condType: RunningConditionType, status: Status{ Conditions: []Condition{ - Condition{ + { Type: RunningConditionType, }, }, @@ -110,7 +110,7 @@ func TestGetCondition(t *testing.T) { condType: RunningConditionType, status: Status{ Conditions: []Condition{ - Condition{ + { Type: FailureConditionType, }, }, @@ -122,7 +122,7 @@ func TestGetCondition(t *testing.T) { condType: FailureConditionType, status: Status{ Conditions: []Condition{ - Condition{ + { Type: FailureConditionType, }, }, @@ -136,7 +136,7 @@ func TestGetCondition(t *testing.T) { condType: FailureConditionType, status: Status{ Conditions: []Condition{ - Condition{ + { Type: RunningConditionType, }, }, @@ -167,7 +167,7 @@ func TestRemoveCondition(t *testing.T) { condType: RunningConditionType, status: Status{ Conditions: []Condition{ - Condition{ + { Type: RunningConditionType, }, }, @@ -179,7 +179,7 @@ func TestRemoveCondition(t *testing.T) { condType: RunningConditionType, status: Status{ Conditions: []Condition{ - Condition{ + { Type: FailureConditionType, }, }, @@ -191,7 +191,7 @@ func TestRemoveCondition(t *testing.T) { condType: FailureConditionType, status: Status{ Conditions: []Condition{ - Condition{ + { Type: FailureConditionType, }, }, @@ -203,7 +203,7 @@ func TestRemoveCondition(t *testing.T) { condType: FailureConditionType, status: Status{ Conditions: []Condition{ - Condition{ + { Type: RunningConditionType, }, }, @@ -247,7 +247,7 @@ func TestSetCondition(t *testing.T) { name: "update running condition", status: &Status{ Conditions: []Condition{ - Condition{ + { Type: RunningConditionType, Status: v1.ConditionTrue, Reason: SuccessfulReason, @@ -264,7 +264,7 @@ func TestSetCondition(t *testing.T) { name: "do not update running condition", status: &Status{ Conditions: []Condition{ - Condition{ + { Type: RunningConditionType, Status: v1.ConditionTrue, Reason: RunningReason,