Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
picodata
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
picodata
Commits
acc937db
Commit
acc937db
authored
1 year ago
by
EmirVildanov
Browse files
Options
Downloads
Patches
Plain Diff
feat: small tests fix
parent
f279e130
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!707
feat: support sql GRANT/REVOKE privileges and ALTER USER Login/NoLogin options
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/int/test_sql.py
+3
-5
3 additions, 5 deletions
test/int/test_sql.py
with
3 additions
and
5 deletions
test/int/test_sql.py
+
3
−
5
View file @
acc937db
...
...
@@ -743,14 +743,13 @@ def test_sql_acl_users_roles(cluster: Cluster):
# * Username as is in double parentheses.
acl
=
i1
.
sql
(
f
'
drop user
"
{
upper_username
}
"'
)
assert
acl
[
"
row_count
"
]
==
1
i1
.
sql
(
acl
=
i1
.
sql
(
f
"""
create user
"
{
upper_username
}
"
password
''
using ldap
"""
)
assert
acl
[
"
row_count
"
]
==
1
# * Username without parentheses should be upcasted.
i1
.
sql
(
f
"
drop user
{
username
}
"
)
acl
=
i1
.
sql
(
f
"
drop user
{
username
}
"
)
assert
acl
[
"
row_count
"
]
==
1
# * Username without parentheses should be upcasted.
acl
=
i1
.
sql
(
...
...
@@ -778,7 +777,6 @@ def test_sql_acl_users_roles(cluster: Cluster):
# We can safely retry creating the same user.
acl
=
i1
.
sql
(
f
"
create user
{
username
}
with password
'
{
password
}
'
using md5
"
)
assert
acl
[
"
row_count
"
]
==
1
acl
=
i1
.
sql
(
f
"
create user
{
username
}
with password
'
{
password
}
'
using md5
"
)
assert
acl
[
"
row_count
"
]
==
0
acl
=
i1
.
sql
(
f
"
drop user
{
username
}
"
)
...
...
@@ -866,7 +864,7 @@ def test_sql_acl_users_roles(cluster: Cluster):
# Attempt to create role with the name of already existed user
# should lead to an error.
acl
=
i1
.
sql
(
f
"
create user
\
"
{
username
}
\
"
with password
'
123456789
'
using md5
"
)
acl
=
i1
.
sql
(
f
"
""
create user
"
{
username
}
"
with password
'
123456789
'
using md5
""
"
)
assert
acl
[
"
row_count
"
]
==
1
with
pytest
.
raises
(
ReturnError
,
match
=
"
User with the same name already exists
"
):
i1
.
sql
(
f
'
create role
"
{
username
}
"'
)
...
...
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