add shellspec golden harness for the legacy make engine
- spec/golden/cases.txt: 69 black-box cases (CLI wrapper mode and make include mode) run in a hermetic sandbox with a mocked docker - spec/golden/expected/*.txt recorded from this engine (baseline) - make test / test-golden / golden-record / lint dev targets
This commit is contained in:
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
# Mock docker for myos tests: logs every call, answers a few read-only queries deterministically.
|
||||
[ -n "${MYOS_DOCKER_LOG:-}" ] && printf 'docker %s\n' "$*" >> "$MYOS_DOCKER_LOG"
|
||||
case "$1 $2" in
|
||||
"compose version") echo "${MOCK_COMPOSE_VERSION:-2.29.0}" ;;
|
||||
"compose config") echo "# mock compose config" ;;
|
||||
"compose ps") : ;;
|
||||
"compose "*) : ;;
|
||||
"info --format") echo "${MOCK_SWARM_STATE:-inactive}" ;;
|
||||
"run --rm") case "$*" in *"uname -m"*) echo x86_64 ;; *"uname -s"*) echo Linux ;; *) : ;; esac ;;
|
||||
"images -q") : ;;
|
||||
"ps -q") : ;;
|
||||
"network ls") : ;;
|
||||
"volume ls") : ;;
|
||||
"version --format") echo 29.0.0 ;;
|
||||
*) : ;;
|
||||
esac
|
||||
exit 0
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
[ -n "${MYOS_DOCKER_LOG:-}" ] && printf 'docker-compose %s\n' "$*" >> "$MYOS_DOCKER_LOG"
|
||||
case "$1" in version) echo "${MOCK_COMPOSE_VERSION:-2.29.0}" ;; config) echo "# mock compose config" ;; *) : ;; esac
|
||||
exit 0
|
||||
Reference in New Issue
Block a user