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
321e2d0d
Unverified
Commit
321e2d0d
authored
11 months ago
by
Chris Truter
Committed by
GitHub
11 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Testing parity for appending to and replacing uploads (#40899)
parent
862daf33
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
enterprise/backend/test/metabase_enterprise/upload_test.clj
+6
-5
6 additions, 5 deletions
enterprise/backend/test/metabase_enterprise/upload_test.clj
test/metabase/upload_test.clj
+564
-532
564 additions, 532 deletions
test/metabase/upload_test.clj
with
570 additions
and
537 deletions
enterprise/backend/test/metabase_enterprise/upload_test.clj
+
6
−
5
View file @
321e2d0d
...
...
@@ -10,17 +10,18 @@
(
use-fixtures
:once
(
fixtures/initialize
:db
:test-users
))
(
deftest
uploads
-disabled-for-sandboxed-user-test
(
deftest
create
-disabled-for-sandboxed-user-test
(
mt/test-drivers
(
mt/normal-drivers-with-feature
:uploads
)
(
met/with-gtaps-for-user!
:rasta
{
:gtaps
{
:venues
{}}}
(
is
(
thrown-with-msg?
Exception
#
"Uploads are not permitted for sandboxed users\."
(
upload-test/upload-example-csv!
{
:grant-permission?
false
}))))))
(
deftest
appends
-disabled-for-sandboxed-user-test
(
deftest
update
-disabled-for-sandboxed-user-test
(
mt/test-drivers
(
mt/normal-drivers-with-feature
:uploads
)
(
met/with-gtaps-for-user!
:rasta
{
:gtaps
{
:venues
{}}}
(
is
(
thrown-with-msg?
Exception
#
"Uploads are not permitted for sandboxed users\."
(
upload-test/append-csv-with-defaults!
:user-id
(
mt/user->id
:rasta
)))))))
(
doseq
[
verb
[
:metabase.upload/append
:metabase.upload/replace
]]
(
met/with-gtaps-for-user!
:rasta
{
:gtaps
{
:venues
{}}}
(
is
(
thrown-with-msg?
Exception
#
"Uploads are not permitted for sandboxed users\."
(
upload-test/update-csv-with-defaults!
verb
:user-id
(
mt/user->id
:rasta
))))))))
(
deftest
based-on-upload-for-sandboxed-user-test
(
mt/with-temporary-setting-values
[
uploads-enabled
true
]
...
...
This diff is collapsed.
Click to expand it.
test/metabase/upload_test.clj
+
564
−
532
View file @
321e2d0d
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