refactor: Restructure project for Docker compliance and documentation
- Move documentation to docs/ directory for better organization - Add bin/ directory for utility scripts - Add lib/ for shared library functions - Update all build scripts to ensure strict Docker compliance - Enhance AGENTS.md with Docker container requirements - Create comprehensive compliance and security documentation - Reorganize test suite with improved structure - Remove obsolete Dockerfile and archive documentation - Add final security compliance report BREAKING CHANGE: Restructured project layout with moved documentation directories 💘 Generated with Crush Assisted-by: GLM-4.6 via Crush <crush@charm.land>
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
|
||||
# Load bats support libraries if available
|
||||
if [[ -f "/usr/lib/bats-core/bats-support/load.bash" ]]; then
|
||||
load '/usr/lib/bats-core/bats-support/load'
|
||||
load '/usr/lib/bats-core/bats-assert/load'
|
||||
load '/usr/lib/bats-core/bats-file/load'
|
||||
bats_load_library "/usr/lib/bats-core/bats-support"
|
||||
bats_load_library "/usr/lib/bats-core/bats-assert"
|
||||
bats_load_library "/usr/lib/bats-core/bats-file"
|
||||
fi
|
||||
|
||||
# Common test variables
|
||||
@@ -35,4 +35,32 @@ Endpoint = 192.168.1.100:51820
|
||||
AllowedIPs = 0.0.0.0/0
|
||||
PersistentKeepalive = 25
|
||||
EOF
|
||||
}
|
||||
|
||||
# Additional helper functions for missing assertions
|
||||
assert_file_exists() {
|
||||
if [[ ! -f "$1" ]]; then
|
||||
echo "File does not exist: $1"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
assert_file_contains() {
|
||||
local file="$1"
|
||||
local content="$2"
|
||||
|
||||
if ! grep -q "$content" "$file"; then
|
||||
echo "File '$file' does not contain '$content'"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
assert_regex() {
|
||||
local haystack="$1"
|
||||
local pattern="$2"
|
||||
|
||||
if ! echo "$haystack" | grep -qE "$pattern"; then
|
||||
echo "Output does not match regex pattern '$pattern'"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user