Skip to content
Snippets Groups Projects
Commit 632421f1 authored by Cam Saul's avatar Cam Saul
Browse files

:smirk: tweak test so it won't have to be rewritten if we change max-results-rows

parent 679bcac3
Branches
Tags
No related merge requests found
......@@ -4,6 +4,7 @@
[colorize.core :as color]
[expectations :refer :all]
[metabase.driver :as driver]
[metabase.driver.query-processor :refer [max-result-rows]]
[metabase.test-data :refer [db-id table->id field->id]]))
;; # ERROR RESPONSES
......@@ -11,7 +12,7 @@
;; Check that we get an error response formatted the way we'd expect
(expect
{:status :failed
:error "Column \"CHECKINS.NAME\" not found; SQL statement:\nSELECT \"CHECKINS\".* FROM \"CHECKINS\" WHERE (\"CHECKINS\".\"NAME\" = ?) LIMIT 10000"}
:error (format "Column \"CHECKINS.NAME\" not found; SQL statement:\nSELECT \"CHECKINS\".* FROM \"CHECKINS\" WHERE (\"CHECKINS\".\"NAME\" = ?) LIMIT %d" max-result-rows)}
;; This will print a stacktrace. Better to reassure people that that's on purpose than to make people question whether the tests are working
(do (log/info (color/green "NOTE: The following stacktrace is expected <3"))
(driver/process-query {:database @db-id
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment