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
f749c695
Unverified
Commit
f749c695
authored
7 months ago
by
John Swanson
Committed by
GitHub
7 months ago
Browse files
Options
Downloads
Patches
Plain Diff
oops: enable relevant feature before a test (#40973)
parent
e9a28c25
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/metabase/task/persist_refresh_test.clj
+10
-11
10 additions, 11 deletions
test/metabase/task/persist_refresh_test.clj
with
10 additions
and
11 deletions
test/metabase/task/persist_refresh_test.clj
+
10
−
11
View file @
f749c695
...
...
@@ -115,17 +115,16 @@
(
job-info
db-1
db-2
)))))))
(
deftest
fault-tolerance-test
(
mt/with-model-cleanup
[
TaskHistory
]
(
mt/with-temp
[
Database
db
{
:settings
{
:persist-models-enabled
true
}}
Card
model
{
:type
:model
:database_id
(
u/the-id
db
)}
PersistedInfo
persisted-info
{
:card_id
(
u/the-id
model
)
:database_id
(
u/the-id
db
)}]
(
let
[
test-refresher
(
reify
task.persist-refresh/Refresher
(
refresh!
[
_
_database
_definition
_card
]
{
:state
:success
})
(
unpersist!
[
_
_database
_persisted-info
]))
original-update!
t2/update!
]
;; ensure no EE features
(
mt/with-premium-features
#
{}
(
mt/with-premium-features
#
{
:cache-granular-controls
}
(
mt/with-model-cleanup
[
TaskHistory
]
(
mt/with-temp
[
Database
db
{
:settings
{
:persist-models-enabled
true
}}
Card
model
{
:type
:model
:database_id
(
u/the-id
db
)}
PersistedInfo
persisted-info
{
:card_id
(
u/the-id
model
)
:database_id
(
u/the-id
db
)}]
(
let
[
test-refresher
(
reify
task.persist-refresh/Refresher
(
refresh!
[
_
_database
_definition
_card
]
{
:state
:success
})
(
unpersist!
[
_
_database
_persisted-info
]))
original-update!
t2/update!
]
(
testing
"If saving the `persisted` (or `error`) state fails..."
(
with-redefs
[
t2/update!
(
fn
[
model
id
update
]
(
when
(
=
"persisted"
(
:state
update
))
...
...
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