kudobuilder / kuttl

KUbernetes Test TooL (kuttl)
https://kuttl.dev
Apache License 2.0
688 stars 85 forks source link

Assert at End of TestSuite Setup (Before Tests) #63

Open kensipe opened 4 years ago

kensipe commented 4 years ago

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 commented 4 years ago

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