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
c988a90f
Unverified
Commit
c988a90f
authored
1 year ago
by
Chris Truter
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Add regression test for #38138 (#38144)
parent
4c2bd218
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/metabase/models/setting.clj
+3
-3
3 additions, 3 deletions
src/metabase/models/setting.clj
test/metabase/models/setting_test.clj
+17
-0
17 additions, 0 deletions
test/metabase/models/setting_test.clj
with
20 additions
and
3 deletions
src/metabase/models/setting.clj
+
3
−
3
View file @
c988a90f
...
...
@@ -569,9 +569,9 @@
env-var-value
db-or-cache-value
(
cond
(
some?
(
:default
setting
))
default-value
(
:init
setting
)
(
when-not
*disable-init*
init!
))]]
(
some?
(
:default
setting
))
default-value
(
:init
setting
)
(
when-not
*disable-init*
init!
))]]
(
loop
[[
f
&
more
]
source-fns
]
(
let
[
v
(
when
f
(
f
setting
))]
(
cond
...
...
This diff is collapsed.
Click to expand it.
test/metabase/models/setting_test.clj
+
17
−
0
View file @
c988a90f
...
...
@@ -989,6 +989,23 @@
;;; ------------------------------------------------- Misc tests -------------------------------------------------------
(
defsetting
^
:private
test-no-default-setting
"Setting with a falsey default"
:visibility
:internal
:type
:boolean
)
(
defsetting
^
:private
test-falsey-default-setting
"Setting with a falsey default"
:visibility
:internal
:type
:boolean
:default
false
)
(
deftest
^
:parallel
falsey-default-setting-test
(
testing
"We should use default values even if they are falsey"
(
is
(
=
false
(
test-falsey-default-setting
))))
(
testing
"We should return no value for an uninitialized setting with no default or initializer"
(
is
(
=
nil
(
test-no-default-setting
)))))
(
defsetting
^
:private
test-integer-setting
"test Setting"
:visibility
:internal
...
...
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