Skip to content
Snippets Groups Projects
Unverified Commit 3800cce3 authored by Howon Lee's avatar Howon Lee Committed by GitHub
Browse files

Fix year-change CI breaks (#19507)

We had some CI breaks that are predicated on the year changing. Fix them.
parent 2b287bff
No related branches found
No related tags found
No related merge requests found
......@@ -23,21 +23,21 @@ fi
# taken from https://github.com/docker-library/postgres/blob/master/docker-entrypoint.sh
# This is the specific function that takes the env var which has a "_FILE" at the end and transforms that into a normal env var.
file_env() {
local var="$1"
local fileVar="${var}_FILE"
local def="${2:-}"
if [ "${!var:-}" ] && [ "${!fileVar:-}" ]; then
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
exit 1
fi
local val="$def"
if [ "${!var:-}" ]; then
val="${!var}"
elif [ "${!fileVar:-}" ]; then
val="$(< "${!fileVar}")"
fi
export "$var"="$val"
unset "$fileVar"
local var="$1"
local fileVar="${var}_FILE"
local def="${2:-}"
if [ "${!var:-}" ] && [ "${!fileVar:-}" ]; then
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
exit 1
fi
local val="$def"
if [ "${!var:-}" ]; then
val="${!var}"
elif [ "${!fileVar:-}" ]; then
val="$(< "${!fileVar}")"
fi
export "$var"="$val"
unset "$fileVar"
}
# Here we define which env vars are the ones that will be supported with a "_FILE" ending. We started with the ones that would contain sensitive data
......
(ns metabase.query-processor.pivot-test
"Tests for pivot table actions for the query processor"
(:require [clojure.set :as set]
(:require [clj-time.core :as time]
[clojure.set :as set]
[clojure.test :refer :all]
[medley.core :as m]
[metabase.api.pivots :as pivot.test-utils]
......@@ -95,7 +96,7 @@
:filter [:and
[:= $user_id->people.source "Facebook" "Google"]
[:= $product_id->products.category "Doohickey" "Gizmo"]
[:time-interval $created_at -2 :year {}]]}
[:time-interval $created_at (- 2019 (.getYear (time/now))) :year {}]]}
:pivot-rows [0 1 2]
:pivot-cols []})))
......
(ns metabase.query-processor-test.implicit-joins-test
"Tests for joins that are created automatically when an `:fk->` column is present."
(:require [clojure.test :refer :all]
(:require [clj-time.core :as time]
[clojure.test :refer :all]
[metabase.driver :as driver]
[metabase.test :as mt]))
......@@ -157,6 +158,6 @@
:filter [:and
[:= $user_id->people.source "Facebook" "Google"]
[:= $product_id->products.category "Doohickey" "Gizmo"]
[:time-interval $created_at -2 :year]]
[:time-interval $created_at (- 2019 (.getYear (time/now))) :year]]
:expressions {:pivot-grouping [:abs 0]}
:limit 5}))))))))
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