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

test fix

parent 802997a3
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@
"Preprocessor that does simple transformations to all incoming queries, simplifing the driver-specific implementations."
(:require [clojure.core.match :refer [match]]
[clojure.tools.logging :as log]
[korma.core :refer :all]
[metabase.db :refer :all]
[metabase.driver.interface :as i]
[metabase.models.field :refer [Field field->fk-table]]))
......@@ -121,7 +122,8 @@
;; If we're doing a "rows" aggregation with no breakout or fields clauses add one that will exclude Fields that are supposed to be hidden
(and (= aggregation ["rows"])
(not breakout)
(not fields)) (assoc :fields (sel :many :id Field :table_id source_table, :active true, :preview_display true, :field_type [not= "sensitive"]))))
(not fields)) (assoc :fields (sel :many :id Field :table_id source_table, :active true, :preview_display true,
:field_type [not= "sensitive"], (order :position :asc), (order :id :desc)))))
;; ### PREPROCESS-CUMULATIVE-SUM
......
......@@ -12,7 +12,9 @@
;; Check that we get an error response formatted the way we'd expect
(expect
{:status :failed
:error (format "Column \"CHECKINS.NAME\" not found; SQL statement:\nSELECT \"CHECKINS\".* FROM \"CHECKINS\" WHERE (\"CHECKINS\".\"NAME\" = ?) LIMIT %d" max-result-rows)}
:error (str "Column \"CHECKINS.NAME\" not found; SQL statement:\nSELECT \"CHECKINS\".\"ID\", CAST(\"DATE\" AS DATE), "
"\"CHECKINS\".\"VENUE_ID\", \"CHECKINS\".\"USER_ID\" FROM \"CHECKINS\" WHERE (\"CHECKINS\".\"NAME\" = ?) LIMIT "
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.
Finish editing this message first!
Please register or to comment