Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions internal/ansible/controller/reconcile.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,11 +302,6 @@ func (r *AnsibleOperatorReconciler) markRunning(ctx context.Context, nn types.Na
crStatus := getStatus(u)

// If there is no current status add that we are working on this resource.
errCond := ansiblestatus.GetCondition(crStatus, ansiblestatus.FailureConditionType)
if errCond != nil {
errCond.Status = v1.ConditionFalse
ansiblestatus.SetCondition(&crStatus, *errCond)
}
successCond := ansiblestatus.GetCondition(crStatus, ansiblestatus.SuccessfulConditionType)
if successCond != nil {
successCond.Status = v1.ConditionFalse
Expand Down
20 changes: 10 additions & 10 deletions internal/ansible/controller/status/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func TestGetCondition(t *testing.T) {
condType: RunningConditionType,
status: Status{
Conditions: []Condition{
Condition{
{
Type: RunningConditionType,
},
},
Expand All @@ -110,7 +110,7 @@ func TestGetCondition(t *testing.T) {
condType: RunningConditionType,
status: Status{
Conditions: []Condition{
Condition{
{
Type: FailureConditionType,
},
},
Expand All @@ -122,7 +122,7 @@ func TestGetCondition(t *testing.T) {
condType: FailureConditionType,
status: Status{
Conditions: []Condition{
Condition{
{
Type: FailureConditionType,
},
},
Expand All @@ -136,7 +136,7 @@ func TestGetCondition(t *testing.T) {
condType: FailureConditionType,
status: Status{
Conditions: []Condition{
Condition{
{
Type: RunningConditionType,
},
},
Expand Down Expand Up @@ -167,7 +167,7 @@ func TestRemoveCondition(t *testing.T) {
condType: RunningConditionType,
status: Status{
Conditions: []Condition{
Condition{
{
Type: RunningConditionType,
},
},
Expand All @@ -179,7 +179,7 @@ func TestRemoveCondition(t *testing.T) {
condType: RunningConditionType,
status: Status{
Conditions: []Condition{
Condition{
{
Type: FailureConditionType,
},
},
Expand All @@ -191,7 +191,7 @@ func TestRemoveCondition(t *testing.T) {
condType: FailureConditionType,
status: Status{
Conditions: []Condition{
Condition{
{
Type: FailureConditionType,
},
},
Expand All @@ -203,7 +203,7 @@ func TestRemoveCondition(t *testing.T) {
condType: FailureConditionType,
status: Status{
Conditions: []Condition{
Condition{
{
Type: RunningConditionType,
},
},
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down