Skip to content

Commit 830f2ed

Browse files
Merge pull request #1088 from hongkailiu/simplify_some_unit_tests
NO-JIRA: Simplify unit test TestCVO_UpgradeVerifiedPayload
2 parents f0139d1 + c6bfdd9 commit 830f2ed

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

pkg/cvo/cvo_scenarios_test.go

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2899,18 +2899,8 @@ func TestCVO_UpgradeVerifiedPayload(t *testing.T) {
28992899

29002900
defer shutdownFn()
29012901

2902-
// make the image report unverified
2903-
payloadErr := &payload.UpdateError{
2904-
Reason: "ImageVerificationFailed",
2905-
Message: "The update cannot be verified: some random error",
2906-
Nested: fmt.Errorf("some random error"),
2907-
}
2908-
if !isImageVerificationError(payloadErr) {
2909-
t.Fatal("not the correct error type")
2910-
}
29112902
worker := o.configSync.(*SyncWorker)
29122903
retriever := worker.retriever.(*fakeDirectoryRetriever)
2913-
retriever.Set(PayloadInfo{}, payloadErr)
29142904
retriever.Set(PayloadInfo{Directory: "testdata/payloadtest-2", Verified: true}, nil)
29152905

29162906
go worker.Start(ctx, 1)
@@ -2954,8 +2944,8 @@ func TestCVO_UpgradeVerifiedPayload(t *testing.T) {
29542944
Conditions: []configv1.ClusterOperatorStatusCondition{
29552945
{Type: ImplicitlyEnabledCapabilities, Status: "False", Reason: "AsExpected", Message: "Capabilities match configured spec"},
29562946
{Type: configv1.OperatorAvailable, Status: configv1.ConditionTrue, Message: "Done applying 1.0.0-abc"},
2957-
// cleared failing status and set progressing
29582947
{Type: ClusterStatusFailing, Status: configv1.ConditionFalse},
2948+
// set progressing
29592949
{Type: configv1.OperatorProgressing, Status: configv1.ConditionTrue, Message: "Working towards 1.0.1-abc"},
29602950
{Type: configv1.RetrievedUpdates, Status: configv1.ConditionFalse},
29612951
{Type: DesiredReleaseAccepted, Status: configv1.ConditionTrue, Reason: "PayloadLoaded",

0 commit comments

Comments
 (0)