Skip to content

Commit

Permalink
add test for delete stale entity
Browse files Browse the repository at this point in the history
  • Loading branch information
talsabagport committed Aug 20, 2024
1 parent 6b2c8a3 commit 924368a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/handlers/controllers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,9 @@ func TestSuccessfulControllersHandle(t *testing.T) {
f := newFixture(t, &fixtureConfig{resources: resources, existingObjects: []runtime.Object{newUnstructured(de), newUnstructured(da)}, stateKey: guuid.NewString()})
defer f.portClient.DeleteIntegration(f.controllersHandler.stateKey)

// To test later that the delete stale entities is working
f.portClient.CreateEntity(context.Background(), &port.EntityRequest{Blueprint: blueprint, Identifier: guuid.NewString()}, "", false)

f.runControllersHandle()

f.assertObjectsHandled([]struct{ kind, name string }{{kind: deploymentKind, name: de.Name}, {kind: daemonSetKind, name: da.Name}})
Expand Down

0 comments on commit 924368a

Please sign in to comment.