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
5cf8820c
Commit
5cf8820c
authored
9 years ago
by
Cameron T Saul
Browse files
Options
Downloads
Patches
Plain Diff
test fix
parent
b0a03238
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/metabase/api/meta/table_test.clj
+19
-2
19 additions, 2 deletions
test/metabase/api/meta/table_test.clj
with
19 additions
and
2 deletions
test/metabase/api/meta/table_test.clj
+
19
−
2
View file @
5cf8820c
...
...
@@ -10,6 +10,7 @@
[
table
:refer
[
Table
]])
[
metabase.test.data.datasets
:as
datasets,
:refer
[
*dataset*
with-dataset-when-testing
]]
[
metabase.test-data
:refer
:all
]
[
metabase.test-data.data
:as
data
]
[
metabase.test.util
:refer
[
match-$
expect-eval-actual-first
]]))
...
...
@@ -90,7 +91,6 @@
((
user->client
:rasta
)
:get
200
(
format
"meta/table/%d/fields"
(
table->id
:categories
))))
;; ## GET /api/meta/table/:id/query_metadata
; TODO - create test which includes :field_values
(
expect
(
match-$
(
sel
:one
Table
:id
(
table->id
:categories
))
{
:description
nil
...
...
@@ -133,7 +133,7 @@
:preview_display
true
:created_at
$
:base_type
"TextField"
})]
:field_values
nil
:field_values
{}
:rows
75
:updated_at
$
:entity_name
nil
...
...
@@ -144,6 +144,23 @@
((
user->client
:rasta
)
:get
200
(
format
"meta/table/%d/query_metadata"
(
table->id
:categories
))))
(
def
^
:private
user-last-login-date-strs
"In an effort to be really annoying, the date strings returned by the API are different on Circle than they are locally.
Generate strings like '2014-01-01' at runtime so we get matching values."
(
let
[
format-inst
(
fn
[
^
java.util.Date
inst
]
(
format
"%d-%02d-%02d"
(
+
(
.getYear
inst
)
1900
)
(
+
(
.getMonth
inst
)
1
)
(
.getDate
inst
)))]
(
->>
data/test-data
:users
:rows
(
map
second
)
(
map
format-inst
)
set
sort
vec
)))
;;; GET api/meta/table/:id/query_metadata?include_sensitive_fields
;;; Make sure that getting the User table *does* include info about the password field, but not actual values themselves
(
expect
...
...
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