Skip to content

Commit

Permalink
100% test-code-coverage for condition.go (#529)
Browse files Browse the repository at this point in the history
This change is to add 100% code coverage in Porch condition.go.

---------

Signed-off-by: Kushal Harish Naidu <kushal.harish.naidu@ericsson.com>
  • Loading branch information
kushnaidu committed Feb 21, 2024
1 parent 01cb704 commit c886932
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions controllers/pkg/porch/condition/condition_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,20 @@ func TestPackageRevisionIsReady(t *testing.T) {
},
want: true,
},
"Condition type not present": {
conds: []porchv1alpha1.Condition{
{
Type: "myterriblecondition",
Status: porchv1alpha1.ConditionStatus(porchv1alpha1.ConditionFalse),
},
},
readyGates: []porchv1alpha1.ReadinessGate{
{
ConditionType: "notmyterriblecondition",
},
},
want: false,
},
"Not ready": {
conds: []porchv1alpha1.Condition{
{
Expand Down

0 comments on commit c886932

Please sign in to comment.