fix(package): db-tool: call postgres-init/cleanup binaries instead of local devshell scripts
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
# shellcheck shell=dash
|
||||
|
||||
HECTIC_NAMESPACE=test-db-tool-deploy-basic
|
||||
export HECTIC_NAMESPACE
|
||||
|
||||
pg_harness_start
|
||||
PG_WORKING_DIR=$(mktemp -d)
|
||||
export PG_WORKING_DIR PG_DATABASE=testdb PG_PORT=5432 PG_SHARED_PRELOAD_LIBRARIES=''
|
||||
|
||||
cleanup() { postgres-cleanup; rm -rf "$PG_WORKING_DIR"; }
|
||||
trap 'cleanup' EXIT INT TERM
|
||||
|
||||
LOCAL_DIR=$(mktemp -d)
|
||||
export LOCAL_DIR
|
||||
mkdir -p "$LOCAL_DIR/devshell"
|
||||
printf '#!/bin/dash\nexit 0\n' > "$LOCAL_DIR/devshell/postgres-init.sh"
|
||||
chmod +x "$LOCAL_DIR/devshell/postgres-init.sh"
|
||||
|
||||
log notice "test case: database deploy --no-hydrate --no-patch exits 0"
|
||||
if ! database deploy --no-hydrate --no-patch; then
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
# shellcheck shell=dash
|
||||
|
||||
HECTIC_NAMESPACE=test-db-tool-deploy-cleanup-flag
|
||||
export HECTIC_NAMESPACE
|
||||
|
||||
pg_harness_start
|
||||
PG_WORKING_DIR=$(mktemp -d)
|
||||
export PG_WORKING_DIR PG_DATABASE=testdb PG_PORT=5432 PG_SHARED_PRELOAD_LIBRARIES=''
|
||||
|
||||
LOCAL_DIR=$(mktemp -d)
|
||||
export LOCAL_DIR
|
||||
mkdir -p "$LOCAL_DIR/devshell"
|
||||
printf '#!/bin/dash\nexit 0\n' > "$LOCAL_DIR/devshell/postgres-init.sh"
|
||||
printf '#!/bin/dash\nexit 0\n' > "$LOCAL_DIR/devshell/postgres-cleanup.sh"
|
||||
chmod +x "$LOCAL_DIR/devshell/postgres-init.sh" "$LOCAL_DIR/devshell/postgres-cleanup.sh"
|
||||
|
||||
log notice "test case: database deploy --no-hydrate --no-patch --cleanup exits 0"
|
||||
if ! database deploy --no-hydrate --no-patch --cleanup; then
|
||||
|
||||
Reference in New Issue
Block a user