UNCLASSIFIED - NO CUI

Skip to content

cypress: allow optionally disabling cypress tests

Daniel Dides requested to merge dd/17-allow-disabling-cypress into master

General MR

Summary

Allow the ability to explicitly disable the cypress test runner. Defaults to always running as long as .bbtests.enabled is set.

Relevant logs/screenshots

Basic configuration with bbtest.enabled set

bbtests:
  enabled: true
$ helm template build chart -f override.yaml | yq e '. | select(.metadata.name == "neuvector-cypress-test")' | head -n 5
# Source: neuvector/templates/tests/test-ui.yaml
kind: Pod
apiVersion: v1
metadata:
  name: "neuvector-cypress-test"

bbtests.enabled false

bbtests:
  enabled: false
  cypress:
    enabled: true
$ helm template build chart -f override.yaml | yq e '. | select(.metadata.name == "neuvector-cypress-test")' | head -n 5
<no output>

bbtest.enabled but cypress.enabled set to false

bbtests:
  enabled: true
  cypress:
    enabled: false
$ helm template build chart -f override.yaml | yq e '. | select(.metadata.name == "neuvector-cypress-test")' | head -n 5
<no output>

Both true

bbtests:
  enabled: true
  cypress:
    enabled: true
$ helm template build chart -f override.yaml | yq e '. | select(.metadata.name == "neuvector-cypress-test")' | head -n 5
# Source: neuvector/templates/tests/test-ui.yaml
kind: Pod
apiVersion: v1
metadata:
  name: "neuvector-cypress-test"

Closes #17 (closed)

Merge request reports