Skip to content

Commit

Permalink
Test/user (#5139)
Browse files Browse the repository at this point in the history
* Add some tests about user management.

* Add tests about user roles.

* Format.

* Fix tck fixture name.

* Fix step name.

* Change step name.

---------

Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com>
  • Loading branch information
Shylock-Hg and Sophie-Xie committed Jan 29, 2023
1 parent 7acdc9f commit 211e4e7
Show file tree
Hide file tree
Showing 2 changed files with 424 additions and 2 deletions.
16 changes: 16 additions & 0 deletions tests/tck/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -980,3 +980,19 @@ def switch_to_new_session(conn_pool, user, password, class_fixture_variables, ex
sess = conn_pool.get_session(user, password)
class_fixture_variables["sessions"].append(sess)
exec_ctx["current_session"] = sess

@when(parse('verify login with user "{user}"'))
def login_without_password(conn_pool, user):
sess = None
try:
sess = conn_pool.get_session(user, '')
except Exception as e:
assert e

@when(parse('verify login with user "{user}" and password "{password}"'))
def login_with_password(conn_pool, user, password):
sess = None
try:
sess = conn_pool.get_session(user, password)
except Exception as e:
assert e
Loading

0 comments on commit 211e4e7

Please sign in to comment.