Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Add another test for codecov to be happy
Browse files Browse the repository at this point in the history
  • Loading branch information
LittleBaiBai committed Jan 23, 2024
1 parent 1f496b9 commit 400b6d1
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions reconcilers/cast_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,26 @@ func TestCastResource(t *testing.T) {
},
ShouldErr: true,
},
"unmarshal error with reconciliation error": {
Resource: resource.
SpecDie(func(d *dies.TestResourceSpecDie) {
d.ErrOnUnmarshal(true)
}).
DieReleasePtr(),
Metadata: map[string]interface{}{
"SubReconciler": func(t *testing.T, c reconcilers.Config) reconcilers.SubReconciler[*resources.TestResource] {
return &reconcilers.CastResource[*resources.TestResource, *resources.TestResource]{
Reconciler: &reconcilers.SyncReconciler[*resources.TestResource]{
Sync: func(ctx context.Context, resource *resources.TestResource) error {
resource.Spec.Template.Name = "Updated"
return fmt.Errorf("subreconciler error")
},
},
}
},
},
ShouldErr: true,
},
}

rts.Run(t, scheme, func(t *testing.T, rtc *rtesting.SubReconcilerTestCase[*resources.TestResource], c reconcilers.Config) reconcilers.SubReconciler[*resources.TestResource] {
Expand Down

0 comments on commit 400b6d1

Please sign in to comment.