kuttl icon indicating copy to clipboard operation
kuttl copied to clipboard

Assert at End of TestSuite Setup (Before Tests)

Open kensipe opened this issue 5 years ago • 1 comments

A great strategy for "ensuring" a controller or resources is to have a step 0 assert of that instance running see https://github.com/kudobuilder/kudo/pull/1473 test/e2e/cli-install-uninstall/00-assert.yaml

apiVersion: v1
kind: Pod
metadata:
  labels:
    app: kudo-manager
    control-plane: controller-manager
  namespace: kudo-system
status:
   phase: Running 

Assuming you may want this as a precondition on all tests... it would be great to assert this at the end of TestSuite setup prior to tests.

kensipe avatar Apr 17 '20 14:04 kensipe

something like:

apiVersion: kudo.dev/v1beta1
kind: TestSuite
crdDir: ./config/crds/
manifestDirs:
- ./test/manifests/
testDirs:
- ./test/integration
commands:
  - command: ./bin/manager
    background: true
startControlPlane: true
setup-assert:
    controller-running.yaml

kensipe avatar Apr 17 '20 14:04 kensipe