Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions .github/workflows/test.yml

This file was deleted.

101 changes: 101 additions & 0 deletions helm/flowfuse/tests/configmap_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,107 @@ templates:
set:
forge.domain: "chart-unit-tests.com"
tests:
- it: should render core server settings (host, port, domain)
set:
forge.domain: example.com
asserts:
- matchRegex:
path: data["flowforge.yml"]
pattern: "host: 0\\.0\\.0\\.0"
- matchRegex:
path: data["flowforge.yml"]
pattern: "port: 3000"
- matchRegex:
path: data["flowforge.yml"]
pattern: "domain: example\\.com"

- it: should configure the postgres database
asserts:
- matchRegex:
path: data["flowforge.yml"]
pattern: "db:\\n\\s+type: postgres"

- it: should configure the kubernetes driver
asserts:
- matchRegex:
path: data["flowforge.yml"]
pattern: "driver:\\n\\s+type: kubernetes"

- it: should render default logging configuration
asserts:
- matchRegex:
path: data["flowforge.yml"]
pattern: "logging:\\n\\s+level: info\\n\\s+http: info"

- it: should render the email block when email is configured
set:
forge.email:
from: '"FlowForge" <flowforge@example.com>'
ses:
region: eu-west-1
asserts:
- matchRegex:
path: data["flowforge.yml"]
pattern: "email:\\n\\s+enabled: true"

- it: should default the email block to disabled when email is not configured
asserts:
- matchRegex:
path: data["flowforge.yml"]
pattern: "email:\\n\\s+enabled: false"

- it: should render broker url and public_url when broker is enabled
set:
forge.broker:
enabled: true
url: mqtt://flowforge-broker.default:1883
public_url: wss://mqtt.example.com
asserts:
- matchRegex:
path: data["flowforge.yml"]
pattern: "broker:"
- matchRegex:
path: data["flowforge.yml"]
pattern: "url: mqtt://flowforge-broker\\.default:1883"
- matchRegex:
path: data["flowforge.yml"]
pattern: "public_url: wss://mqtt\\.example\\.com"

- it: should render the fileStore url when fileStore is enabled
release:
namespace: default
set:
forge.fileStore.enabled: true
asserts:
- matchRegex:
path: data["flowforge.yml"]
pattern: "fileStore:\\n\\s+url: http://flowforge-file\\.default"

- it: should render sentry telemetry for frontend and backend
set:
forge.telemetry.sentry:
production_mode: false
frontend_dsn: https://sentry.io/flowforge/flowforge-frontend
backend_dsn: https://sentry.io/flowforge/flowforge-backend
asserts:
- matchRegex:
path: data["flowforge.yml"]
pattern: "dsn: https://sentry\\.io/flowforge/flowforge-frontend"
- matchRegex:
path: data["flowforge.yml"]
pattern: "dsn: https://sentry\\.io/flowforge/flowforge-backend"
- matchRegex:
path: data["flowforge.yml"]
pattern: "production_mode: false"

- it: should render prometheus enabled in backend telemetry
set:
forge.telemetry.backend.prometheus.enabled: true
asserts:
- matchRegex:
path: data["flowforge.yml"]
pattern: "prometheus:\\n\\s+enabled: true"

- it: should not include projectProbes by default
asserts:
- notMatchRegex:
Expand Down
27 changes: 27 additions & 0 deletions helm/flowfuse/tests/file_storage_configmap_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json
suite: test file storage configmap
templates:
- file-storage-configmap.yaml
set:
forge.domain: "chart-unit-tests.com"
forge.fileStore.enabled: true
tests:
- it: should create the flowfuse-file-config configmap
documentSelector:
path: metadata.name
value: flowfuse-file-config
asserts:
- isKind:
of: ConfigMap
- equal:
path: metadata.name
value: flowfuse-file-config

- it: should enable http logging in the file storage config
documentSelector:
path: metadata.name
value: flowfuse-file-config
asserts:
- matchRegex:
path: data["flowforge-storage.yml"]
pattern: "logging:\\n\\s+level: info\\n\\s+http: info"
29 changes: 0 additions & 29 deletions test/.eslintrc

This file was deleted.

104 changes: 0 additions & 104 deletions test/customizations-teambroker.yml

This file was deleted.

79 changes: 0 additions & 79 deletions test/customizations.yml

This file was deleted.

20 changes: 0 additions & 20 deletions test/package.json

This file was deleted.

Loading
Loading