Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
516f03f5
Unverified
Commit
516f03f5
authored
4 months ago
by
Case Nelson
Committed by
GitHub
4 months ago
Browse files
Options
Downloads
Patches
Plain Diff
fix: tests for clickhouse development (#49347)
parent
bd0a0080
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.clj-kondo/test/hooks/clojure/test_test.clj
+8
-5
8 additions, 5 deletions
.clj-kondo/test/hooks/clojure/test_test.clj
test/metabase/api/pivots.clj
+1
-3
1 addition, 3 deletions
test/metabase/api/pivots.clj
test/metabase/events/view_log_test.clj
+6
-1
6 additions, 1 deletion
test/metabase/events/view_log_test.clj
with
15 additions
and
9 deletions
.clj-kondo/test/hooks/clojure/test_test.clj
+
8
−
5
View file @
516f03f5
...
...
@@ -3,7 +3,6 @@
[
clj-kondo.hooks-api
:as
api
]
[
clj-kondo.impl.utils
]
[
clojure.edn
:as
edn
]
[
clojure.java.io
:as
io
]
[
clojure.test
:refer
:all
]
[
hooks.clojure.test
]))
...
...
@@ -44,9 +43,13 @@
(
testing
"Make sure we keep hooks.clojure.test/driver-keywords up to date"
(
let
[
driver-keywords
(
->
(
slurp
".clj-kondo/config.edn"
)
edn/read-string
(
get-in
[
:linters
:metabase/disallow-hardcoded-driver-names-in-tests
:drivers
]))]
(
doseq
[
^
java.io.File
file
(
.listFiles
(
io/file
"modules/drivers"
))
:when
(
.isDirectory
file
)
:let
[
driver
(
keyword
(
.getName
file
))]]
(
get-in
[
:linters
:metabase/disallow-hardcoded-driver-names-in-tests
:drivers
]))
driver-modules
(
->>
(
slurp
"modules/drivers/deps.edn"
)
edn/read-string
:deps
vals
(
keep
(
comp
keyword
:local/root
))
(
into
#
{}))]
(
doseq
[
driver
driver-modules
]
(
is
(
contains?
driver-keywords
driver
)
(
format
"hooks.clojure.test/driver-keywords should contain %s, please add it"
driver
))))))
This diff is collapsed.
Click to expand it.
test/metabase/api/pivots.clj
+
1
−
3
View file @
516f03f5
...
...
@@ -5,9 +5,7 @@
(
defn
applicable-drivers
"Drivers that these pivot table tests should run on"
[]
(
disj
(
mt/normal-drivers-with-feature
:expressions
:left-join
)
;; mongodb doesn't support foreign keys required by this test
:mongo
(
disj
(
mt/normal-drivers-with-feature
:expressions
:left-join
:metadata/key-constraints
)
;; Disable on Redshift due to OutOfMemory issue (see #18834)
:redshift
))
...
...
This diff is collapsed.
Click to expand it.
test/metabase/events/view_log_test.clj
+
6
−
1
View file @
516f03f5
...
...
@@ -61,7 +61,12 @@
(
latest-view
(
mt/user->id
:crowberto
)
(
u/id
coll
))))))))
(
deftest
update-view-dashboard-timestamp-test
(
let
[
now
(
t/offset-date-time
)
;; the DB might save `last_used_at` with a different level of precision than the JVM does, on some machines
;; `offset-date-time` returns nanosecond precision (9 decimal places) but `last_viewed_at` is coming back with
;; microsecond precision (6 decimal places). We don't care about such a small difference, just strip it off of the
;; times we're comparing.
(
let
[
now
(
->
(
t/offset-date-time
)
(
.withNano
0
))
one-hour-ago
(
t/minus
now
(
t/hours
1
))
two-hours-ago
(
t/minus
now
(
t/hours
2
))]
(
testing
"update with multiple dashboards of the same ids will set timestamp to the latest"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment