Update runner tests to handle manageStatus
@@ -121,6 +121,7 @@ func TestNewFromWatches(t *testing.T) {
Kind: "NoFinalizer",
},
Path: validTemplate.ValidPlaybook,
+ manageStatus: true,
reconcilePeriod: &twoSeconds,
},
schema.GroupVersionKind{
@@ -134,6 +135,7 @@ func TestNewFromWatches(t *testing.T) {
Kind: "Playbook",
},
Path: validTemplate.ValidPlaybook,
+ manageStatus: true,
Finalizer: &Finalizer{
Name: "finalizer.app.example.com",
Role: validTemplate.ValidRole,
@@ -152,6 +154,7 @@ func TestNewFromWatches(t *testing.T) {
},
Path: validTemplate.ValidPlaybook,
reconcilePeriod: &zeroSeconds,
+ manageStatus: true,
},
schema.GroupVersionKind{
Version: "v1alpha1",
@@ -203,6 +206,7 @@ func TestNewFromWatches(t *testing.T) {
Kind: "Role",
},
Path: validTemplate.ValidRole,
+ manageStatus: true,
Finalizer: &Finalizer{
Name: "finalizer.app.example.com",
Playbook: validTemplate.ValidPlaybook,
@@ -237,6 +241,9 @@ func TestNewFromWatches(t *testing.T) {
if run.GVK != expectedR.GVK {
t.Fatalf("the GVK: %v\nunexpected GVK: %#v\nexpected GVK: %#v", k, run.GVK, expectedR.GVK)
}
+ if run.manageStatus != expectedR.manageStatus {
+ t.Fatalf("the GVK: %v\nunexpected manageStatus:%#v\nexpected manageStatus: %#v", k, run.manageStatus, expectedR.manageStatus)
+ }
if run.Finalizer != expectedR.Finalizer {
if run.Finalizer.Name != expectedR.Finalizer.Name || run.Finalizer.Playbook != expectedR.Finalizer.Playbook || run.Finalizer.Role != expectedR.Finalizer.Role || reflect.DeepEqual(run.Finalizer.Vars["sentinel"], expectedR.Finalizer.Vars["sentininel"]) {
t.Fatalf("the GVK: %v\nunexpected finalizer: %#v\nexpected finalizer: %#v", k, run.Finalizer, expectedR.Finalizer)
