-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
9 changed files
with
46 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
tests/acceptance/test_data/templates/expected_duckdb_backend_json_casting.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
"CAST(preferences AS ""JSON"")" | ||
"{""theme"": ""dark"", ""notifications"": true}" | ||
"{""theme"": ""light"", ""notifications"": true}" | ||
"{""theme"": ""dark"", ""notifications"": true}" |
2 changes: 2 additions & 0 deletions
2
tests/acceptance/test_data/templates/expected_duckdb_backend_total_employee.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Total Employees | ||
3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
load "$LIB_BATS_ASSERT/load.bash" | ||
load "$LIB_BATS_SUPPORT/load.bash" | ||
|
||
@test "connecting to a duckdb backend" { | ||
cd $MODS_DIR/duckdb_mod | ||
|
||
# run a powerpipe query connecting to a local duckdb database | ||
run powerpipe query run query.total_employee --database duckdb:///$MODS_DIR/duckdb_mod/employee.duckdb --output csv | ||
echo $output | ||
# check output | ||
assert_equal "$output" "$(cat $TEST_DATA_DIR/expected_duckdb_backend_total_employee.csv)" | ||
} | ||
|
||
@test "using json extension(casting) with duckdb backend" { | ||
cd $MODS_DIR/duckdb_mod | ||
|
||
# run a powerpipe query(which performs a JSON casting operation) connecting to a local duckdb database | ||
run powerpipe query run query.json_casting --database duckdb:///$MODS_DIR/duckdb_mod/employee.duckdb --output csv | ||
echo $output | ||
# check output | ||
assert_equal "$output" "$(cat $TEST_DATA_DIR/expected_duckdb_backend_json_casting.csv)" | ||
} |