-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Test Runner and fix metabase.driver.teradata-test
- Loading branch information
taabrcr
authored and
Cristian Bressi
committed
Jul 5, 2022
1 parent
b116f06
commit 2426510
Showing
3 changed files
with
53 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
(ns metabase.driver.teradata-test | ||
(:require [expectations :refer :all] | ||
(:require [expectations.clojure.test :refer [defexpect expect expecting]] | ||
[metabase.driver.sql-jdbc.connection :as sql-jdbc.conn])) | ||
|
||
(def result | ||
(sql-jdbc.conn/connection-details->spec :teradata {:host "localhost" | ||
:additional-options "CONNECT_FAILURE_TTL=300,ERROR_QUERY_INTERVAL=300000,RECONNECT_INTERVAL=300,COP=OFF,REDRIVE=0"})) | ||
|
||
(def hardcoded | ||
{:classname "com.teradata.jdbc.TeraDriver" | ||
:subprotocol "teradata" | ||
:subname "//localhost/CHARSET=UTF8,TMODE=ANSI,ENCRYPTDATA=ON,FINALIZE_AUTO_CLOSE=ON,LOB_SUPPORT=OFF,CONNECT_FAILURE_TTL=300,ERROR_QUERY_INTERVAL=300000,RECONNECT_INTERVAL=300,COP=OFF,REDRIVE=0"}) | ||
|
||
;; Check that additional JDBC options are handled correctly. This is comma separated for Teradata. | ||
(expect | ||
{:classname "com.teradata.jdbc.TeraDriver" | ||
:subprotocol "teradata" | ||
:subname "//localhost/CHARSET=UTF8,TMODE=ANSI,ENCRYPTDATA=ON,FINALIZE_AUTO_CLOSE=ON,LOB_SUPPORT=OFF,COP=OFF" | ||
:delimiters "`"} | ||
(-> (sql-jdbc.conn/connection-details->spec :teradata {:host "localhost" | ||
:additional-options "COP=OFF"}))) | ||
(defexpect db-test | ||
(expect | ||
hardcoded | ||
result)) |