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
38440129
Commit
38440129
authored
7 years ago
by
Cam Saul
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #5894 from metabase/update-docstring-checker
Fix docstring checker crashes
parents
592170db
a11bef31
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
project.clj
+1
-1
1 addition, 1 deletion
project.clj
test/metabase/models/on_demand_test.clj
+3
-3
3 additions, 3 deletions
test/metabase/models/on_demand_test.clj
with
4 additions
and
4 deletions
project.clj
+
1
−
1
View file @
38440129
...
...
@@ -125,7 +125,7 @@
#
"^metabase\.http-client$"
]}
:profiles
{
:dev
{
:dependencies
[[
expectations
"2.2.0-beta2"
]
; unit tests
[
ring/ring-mock
"0.3.0"
]]
; Library to create mock Ring requests for unit tests
:plugins
[[
docstring-checker
"1.0.
0
"
]
; Check that all public vars have docstrings. Run with 'lein docstring-checker'
:plugins
[[
docstring-checker
"1.0.
2
"
]
; Check that all public vars have docstrings. Run with 'lein docstring-checker'
[
jonase/eastwood
"0.2.3"
:exclusions
[
org.clojure/clojure
]]
; Linting
[
lein-bikeshed
"0.4.1"
]
; Linting
...
...
This diff is collapsed.
Click to expand it.
test/metabase/models/on_demand_test.clj
+
3
−
3
View file @
38440129
...
...
@@ -24,7 +24,7 @@
(
f
updated-field-names
)
@
updated-field-names
)))
(
def
^
:private
basic-native-query
(
def
n-
basic-native-query
[]
{
:database
(
data/id
)
:type
"native"
:native
{
:query
"SELECT AVG(SUBTOTAL) AS \"Average Price\"\nFROM ORDERS"
}})
...
...
@@ -99,7 +99,7 @@
#
{
"New Field"
}
;; create a Card with non-parameterized query
(
do-with-updated-fields-for-card
{
:db
{
:is_on_demand
true
}
:card
{
:dataset_query
basic-native-query
}
:card
{
:dataset_query
(
basic-native-query
)
}
:field
{
:name
"New Field"
}}
(
fn
[{
:keys
[
table
field
card
]}]
;; now change the query to one that references our Field in a on-demand DB. Field should have updated values
...
...
@@ -120,7 +120,7 @@
#
{}
;; create a Card with non-parameterized query
(
do-with-updated-fields-for-card
{
:db
{
:is_on_demand
false
}
:card
{
:dataset_query
basic-native-query
}}
:card
{
:dataset_query
(
basic-native-query
)
}}
(
fn
[{
:keys
[
field
card
]}]
;; now change the query to one that references a Field. Field should not get values since DB is not On-Demand
(
db/update!
Card
(
u/get-id
card
)
...
...
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