Bunker OS treats testing as a first-class operational concern. The 430-test suite covers every layer of the system: n8n workflow JSON structure, vault file integrity, shell script correctness, YAML configuration validity, and BM25 retrieval functionality. All tests run through a singleDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/SamBleed/opencode-obsidian/llms.txt
Use this file to discover all available pages before exploring further.
Makefile entry point and execute automatically on every push and pull request to main via GitHub Actions.
Test Suite Overview
| Suite | Tests | What it validates |
|---|---|---|
test-workflows | 344 | All n8n JSONs parseable, valid connections, no orphans |
test-wiki | 21 | Essential files exist, valid frontmatter, docker running |
test-scripts | 61 | Bash syntax, shebang, executables, no secrets, go vet |
test-yaml | 2 | CI and docker-compose YAML valid |
test-retrieve | 2 | BM25 index exists, search returns results |
Running Tests
make test target runs the suites in order: test-yaml → test-workflows → test-wiki → test-scripts → test-retrieve. All suites must pass for the target to exit with code 0.
Suite Details
test-workflows (344 tests)
Usestests/test_workflow_connections.py. This Python script parses every n8n workflow JSON in automation/n8n-lab/workflows/ and validates:
- Every JSON file is parseable (no syntax errors)
- All node connections reference nodes that exist within the workflow
- No orphaned nodes (nodes with no incoming or outgoing connections where connections are expected)
test-wiki (21 tests)
Usestests/test_wiki_integrity.sh. This bash script validates the vault’s structural health:
Essential files
Checks that
wiki/hot.md, wiki/index.md, wiki/log.md, BUNKER_RULES.md, PROJECT.md, and AGENTS.md all exist.Executable scripts
Confirms that
bin/bunker-check.sh, bin/wiki-integrity.sh, bin/evidence-index.sh, bin/wiki-sync.sh, and bin/bunker.sh all have the executable bit set.Frontmatter validation
Checks that
wiki/hot.md has title: and updated: fields. Checks that wiki/index.md has title: and updated: fields.n8n lab
Checks that
automation/n8n-lab/docker-compose.yml and automation/n8n-lab/.env exist. Checks whether the n8n Docker container is running.test-scripts (61 tests)
Usestests/test_scripts.sh. This bash script runs five categories of checks against every .sh file in bin/:
Bash Syntax
Runs
bash -n on each script. A syntax error fails the test immediately.Shebang Check
Verifies each script starts with
#!/usr/bin/env bash, #!/bin/bash, or #!/usr/bin/bash.Executable Bit
Checks that every script has the executable bit set via
-x test.Secrets Scan
Scans for hardcoded secret patterns using
grep -Pq. See patterns below.go vet on any .go files found in bin/. If go is not installed, those tests fail with go no instalado.
Secrets Patterns Scanned
make test invocation — secrets are caught before they can reach a push.
test-yaml (2 tests)
Validates two YAML configuration files by loading them with Python’spyyaml:
pyyaml is an optional dependency. If it is not installed, test-yaml degrades gracefully and prints ⚠️ yaml no disponible (pip install pyyaml) without failing the overall test run. Install it with pip install pyyaml to enable this suite.test-retrieve (2 tests)
Validates the BM25 retrieval system with two direct checks:python3 scripts/retrieve.py build to create it.
GitHub Actions CI
The.github/workflows/test.yml CI workflow runs on every push and pull request targeting main. It executes all 5 suites in the same order as make test.
The workflow covers:
- Python 3.10+ (for
test-workflows,test-yaml,test-retrieve) - Bash 4.0+ (for
test-wiki,test-scripts) - Go (for
go vetintest-scripts, optional)
Secrets Scanning in CI
The secrets scan intest-scripts runs on every CI execution. Any hardcoded secret that matches the six patterns above will break the CI build before the code reaches main. This is the primary defense against accidentally committed credentials.
Extending the Test Suite
To add tests to an existing suite:- test-scripts: Add checks in
tests/test_scripts.shusing thetest()helper function - test-wiki: Add checks in
tests/test_wiki_integrity.shusingcheck_file_existsorcheck_frontmatter - test-workflows: Modify
tests/test_workflow_connections.py - test-retrieve: Add assertions in the
test-retrieveMakefile target
test() call in the bash test files increments PASS or FAIL and contributes to the final count.
Related Pages
CLI Scripts
The
bunker-check.sh script that runs a pre-push health check.BM25 Retrieval
Details on the BM25 index that
test-retrieve validates.Security
How the secrets scan fits into the broader security model.
Automation Overview
The n8n workflows validated by the 344-test
test-workflows suite.