Skip to content

Commit

Permalink
drop space and user if exists
Browse files Browse the repository at this point in the history
  • Loading branch information
yixinglu committed Mar 17, 2022
1 parent bf1db31 commit d244c5a
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions tests/admin/test_permission.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,43 +29,43 @@ def prepare(self):

@classmethod
def cleanup(self):
query = 'DROP USER test'
query = 'DROP USER IF EXISTS test'
resp = self.execute(query)
self.check_resp_succeeded(resp)

query = 'DROP USER admin'
query = 'DROP USER IF EXISTS admin'
resp = self.execute(query)
self.check_resp_succeeded(resp)

query = 'DROP USER dba'
query = 'DROP USER IF EXISTS dba'
resp = self.execute(query)
self.check_resp_succeeded(resp)

query = 'DROP USER user'
query = 'DROP USER IF EXISTS user'
resp = self.execute(query)
self.check_resp_succeeded(resp)

query = 'DROP USER guest'
query = 'DROP USER IF EXISTS guest'
resp = self.execute(query)
self.check_resp_succeeded(resp)

query = 'DROP SPACE test_permission_space'
query = 'DROP SPACE IF EXISTS test_permission_space'
resp = self.execute(query)
self.check_resp_succeeded(resp)

query = 'DROP SPACE space1'
query = 'DROP SPACE IF EXISTS space1'
resp = self.execute(query)
self.check_resp_succeeded(resp)

query = 'DROP SPACE space2'
query = 'DROP SPACE IF EXISTS space2'
resp = self.execute(query)
self.check_resp_succeeded(resp)

query = 'DROP SPACE space3'
query = 'DROP SPACE IF EXISTS space3'
resp = self.execute(query)
self.check_resp_succeeded(resp)

query = 'DROP SPACE space4'
query = 'DROP SPACE IF EXISTS space4'
resp = self.execute(query)
self.check_resp_succeeded(resp)

Expand Down Expand Up @@ -163,11 +163,11 @@ def test_user_write(self):
resp = self.adminClient.execute(query)
self.check_resp_failed(resp, ttypes.ErrorCode.E_BAD_PERMISSION)

query = 'DROP USER admin'
query = 'DROP USER IF EXISTS admin'
resp = self.adminClient.execute(query)
self.check_resp_failed(resp, ttypes.ErrorCode.E_BAD_PERMISSION)

query = 'DROP USER admin'
query = 'DROP USER IF EXISTS admin'
resp = self.execute(query)
self.check_resp_succeeded(resp)

Expand Down Expand Up @@ -806,6 +806,6 @@ def test_show_roles(self):
self.check_out_of_order_result(resp, expected_result)

# clean up
query = 'DROP SPACE space5'
query = 'DROP SPACE IF EXISTS space5'
resp = self.execute(query)
self.check_resp_succeeded(resp)

0 comments on commit d244c5a

Please sign in to comment.