Skip to content

Commit

Permalink
Use absolute path for the data volume (#749)
Browse files Browse the repository at this point in the history
Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/749
Co-authored-by: David Boreham <[email protected]>
Co-committed-by: David Boreham <[email protected]>
  • Loading branch information
dboreham authored and David Boreham committed Feb 17, 2024
1 parent 37b9500 commit 0b0394a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/database/run-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ mkdir -p $CERC_REPO_BASE_DIR
$TEST_TARGET_SO --stack ${stack} setup-repositories
$TEST_TARGET_SO --stack ${stack} build-containers
# Test basic stack-orchestrator deploy to k8s
test_deployment_dir=$CERC_REPO_BASE_DIR/test-${deployment_dir}
test_deployment_spec=$CERC_REPO_BASE_DIR/test-${spec_file}
test_deployment_dir=$CERC_REPO_BASE_DIR/${deployment_dir}
test_deployment_spec=$CERC_REPO_BASE_DIR/${spec_file}

$TEST_TARGET_SO --stack ${stack} deploy --deploy-to k8s-kind init --output $test_deployment_spec
# Check the file now exists
Expand All @@ -85,6 +85,9 @@ if [ ! -f "$test_deployment_spec" ]; then
fi
echo "deploy init test: passed"

# Switch to a full path for the data dir so it gets provisioned as a host bind mounted volume and preserved beyond cluster lifetime
sed -i "s|^\(\s*db-data:$\)$|\1 ${test_deployment_dir}/data/db-data|" $test_deployment_spec

$TEST_TARGET_SO --stack ${stack} deploy create --spec-file $test_deployment_spec --deployment-dir $test_deployment_dir
# Check the deployment dir exists
if [ ! -d "$test_deployment_dir" ]; then
Expand Down

0 comments on commit 0b0394a

Please sign in to comment.