Skip to content

Commit

Permalink
fix(SetConnectionDetailsTest): Use wd to set expected path for DuckDB…
Browse files Browse the repository at this point in the history
… without dbt profile

Paths for DuckDB are absolute when using a dbt profile, but relative to the pwd when entering config manually. The test now accounts for this dynamically instead of hardcoding the local pwd.
  • Loading branch information
gwenwindflower committed Apr 15, 2024
1 parent c5c533a commit 23fc329
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion set_connection_details_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,14 @@ func TestSetConnectionDetailsWithDuckDBWithoutDbtProfile(t *testing.T) {
Confirm: true,
}
connectionDetails := SetConnectionDetails(formResponse)
wd, err := os.Getwd()
if err != nil {
t.Errorf("Failed to get working directory: %v", err)
}
p := wd + "/dwarf.db"
want := shared.ConnectionDetails{
ConnType: "duckdb",
Path: "/Users/winnie/dev/tbd/dwarf.db",
Path: p,
Database: "khazad_dum",
Schema: "balins_tomb",
}
Expand Down

0 comments on commit 23fc329

Please sign in to comment.