Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add acceptance test job and --to and --from tests #136

Merged
merged 15 commits into from
Jan 16, 2025
Prev Previous commit
Next Next commit
add pragma temp_dir
  • Loading branch information
pskrbasu committed Jan 15, 2025
commit 3d12d563b8ee64f7fba291d207a66cfc8c4314e5
2 changes: 1 addition & 1 deletion .github/workflows/11-test-acceptance.yaml
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ jobs:
with:
repository: turbot/pipe-fittings
path: pipe-fittings
ref: tp
ref: tp-pragma

- name: Checkout Tailpipe plugin SDK repository
uses: actions/checkout@v4
5 changes: 5 additions & 0 deletions internal/parquet/duck_db.go
Original file line number Diff line number Diff line change
@@ -34,6 +34,11 @@ func newDuckDb() (*duckDb, error) {
}

func installAndLoadExtensions(db *sql.DB) error {
// set the TEMP directory
if _, err := db.Exec(fmt.Sprintf("PRAGMA temp_directory='%s';", fmt.Sprintf("%s/duckdb.tmp/tmp/", filepaths.GetInternalDir()))); err != nil {
return fmt.Errorf("failed to set temp_directory: %w", err)
}
// set the extension directory
if _, err := db.Exec(fmt.Sprintf("SET extension_directory = '%s';", filepaths.EnsurePipesDuckDbExtensionsDir())); err != nil {
return fmt.Errorf("failed to set extension_directory: %w", err)
}
1 change: 0 additions & 1 deletion tests/acceptance/run.sh
Original file line number Diff line number Diff line change
@@ -47,7 +47,6 @@ batversion=$(bats --version)
echo $batversion
echo "Running with TAILPIPE_INSTALL_DIR set to: $TAILPIPE_INSTALL_DIR"
echo "Running with binary from: $(which tailpipe)"
export TAILPIPE_LOG_LEVEL=debug

if [ $# -eq 0 ]; then
# Run all test files