From 198e154ed0e4731e9a3578274b2db026c05e5cbf Mon Sep 17 00:00:00 2001 From: Mengqi Yu Date: Mon, 25 Apr 2022 15:09:09 -0700 Subject: [PATCH] cherrypick https://github.com/kubernetes-sigs/cli-utils/pull/582 --- thirdparty/cli-utils/apply/applier_test.go | 36 ++-------------------- 1 file changed, 3 insertions(+), 33 deletions(-) diff --git a/thirdparty/cli-utils/apply/applier_test.go b/thirdparty/cli-utils/apply/applier_test.go index b55adae7ec..302f5bd305 100644 --- a/thirdparty/cli-utils/apply/applier_test.go +++ b/thirdparty/cli-utils/apply/applier_test.go @@ -809,38 +809,8 @@ func TestApplier(t *testing.T) { InventoryPolicy: inventory.PolicyMustMatch, EmitStatusEvents: true, }, - statusEvents: []pollevent.Event{ - { - Type: pollevent.ResourceUpdateEvent, - Resource: &pollevent.ResourceStatus{ - Identifier: testutil.ToIdentifier(t, resources["deployment"]), - Status: status.InProgressStatus, - }, - }, - { - Type: pollevent.ResourceUpdateEvent, - Resource: &pollevent.ResourceStatus{ - Identifier: testutil.ToIdentifier(t, resources["deployment"]), - Status: status.CurrentStatus, - }, - }, - }, - expectedStatusEvents: []testutil.ExpEvent{ - { - EventType: event.StatusType, - StatusEvent: &testutil.ExpStatusEvent{ - Identifier: testutil.ToIdentifier(t, resources["deployment"]), - Status: status.InProgressStatus, - }, - }, - { - EventType: event.StatusType, - StatusEvent: &testutil.ExpStatusEvent{ - Identifier: testutil.ToIdentifier(t, resources["deployment"]), - Status: status.CurrentStatus, - }, - }, - }, + statusEvents: []pollevent.Event{}, + expectedStatusEvents: []testutil.ExpEvent{}, expectedEvents: []testutil.ExpEvent{ { EventType: event.InitType, @@ -1933,7 +1903,7 @@ func TestApplierCancel(t *testing.T) { var removed int receivedEvents, removed = testutil.RemoveEqualEvents(receivedEvents, e) if removed < 1 { - t.Fatalf("Expected status event not received: %#v", e.StatusEvent) + t.Errorf("Expected status event not received: %#v", e.StatusEvent) } }