Skip to content

Commit

Permalink
add test for reconciler loop
Browse files Browse the repository at this point in the history
Signed-off-by: Giovanni Liva <[email protected]>
  • Loading branch information
thisthat committed Mar 24, 2023
1 parent 60b1944 commit 55301d2
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions operator/controllers/options/keptnconfig_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,21 @@ func TestKeptnConfigReconciler_Reconcile(t *testing.T) {
want: ctrl.Result{Requeue: true, RequeueAfter: 10 * time.Second},
wantErr: true,
},
{
name: "continue if request in a different ns",
args: args{
ctx: context.TODO(),
req: ctrl.Request{
NamespacedName: types.NamespacedName{
Namespace: "defenetly-not-keptn-lifecycle-toolkit-system",
Name: "empty-config",
},
},
},
lastAppliedConfig: &optionsv1alpha1.KeptnConfigSpec{},
want: ctrl.Result{},
wantErr: false,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down

0 comments on commit 55301d2

Please sign in to comment.