Commit Graph

10 Commits

Author SHA1 Message Date
Karl Isenberg 3d81e21acf e2e test cleanup
- Unstructured() added to ResourceReference to aid test operations
- Test artifacts moved into artifacts_test.go
- deploymentManifest and apiserviceManifest replaced with
  yaml->unstructured, for consistency with other test artifacts
- Added withReplicas, withNamespace, and withDependsOn for easier inline
  mutation of test artifacts
- Added deleteUnstructuredAndWait, assertUnstructuredExists, and
  assertUnstructuredDoesNotExist to validate actual cluster state,
  not just events. Also reduced flakiness by waiting for delete.
- Removed error check before event validation. The event diff
  provides much more context for debugging.
- Replaced typed resources with unstructured and used
  testutil.NestedField to extract values.
- Updated prune error test to use full event list comparison and
  validate server state.
- Add 2nd resource to continue on error test
- Don't fail early on error from event list
- Fix flakey prune error test
  Add wait for pod2 after creation
  Add wait for pod2 after deletion
  Re-use inventory to ensure prune of pod2 not skipped
- Add optional klog support for e2e tests
2021-09-24 17:54:17 -07:00
Karl Isenberg 6992b74beb Add more robust event list testing in e2e tests
- Add testutil.Equal to show comparisons with cmp.Diff output
- Add github.com/google/go-cmp for cmp.Equal and cmp.Diff
  These comparison tools make debugging easier and properly handle
  error comparisons, using cmpopts.EquateErrors()
- Added EventsToExpEvents, EventToExpEvent, and RemoveEqualEvents
  to testutil to help with comparing event lists
- Add InitEvent to ExpEvent, to enable validating it exists
- e2e tests have all been upgraded to validate a full list of
  events, rather than just a partial list with partial contents.
  This should increase confidence that new changes don't break things.
2021-09-15 00:36:16 -07:00
Sean Sullivan 0777e622f1 Updates e2e tests 2021-07-01 17:47:06 -07:00
Morten Torkildsen 136d1efeeb Better validation of resources prior to actuation 2021-07-01 17:02:57 -07:00
Mikhail Mazurskiy 4eb7dc1f6f
Remove Initialize() on Destroyer and PruneOptions 2021-06-18 14:58:49 +10:00
Morten Torkildsen ae80e561e2 Improve the event hierarchy 2021-05-18 14:58:41 -07:00
Jingfang Liu 048e8867d6 add apply/preview/destroy flag: inventory-policy 2021-01-20 15:03:35 -08:00
Morten Torkildsen 3012f36dce Run e2e tests using a custom type for inventory 2021-01-02 13:26:49 -08:00
Morten Torkildsen 32bf6f6404 Fix missing identifier in delete event 2020-12-31 15:10:00 -08:00
Morten Torkildsen 304deb6852 Add e2e-tests for applying crd and cr at the same time 2020-12-30 15:10:31 -08:00