Skip to content

Commit

Permalink
squash. tests
Browse files Browse the repository at this point in the history
  • Loading branch information
korydraughn committed Apr 5, 2024
1 parent cd5409e commit a23dae5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scripts/irods/test/test_iquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,33 +26,33 @@ def test_iquery_supports_reading_query_from_stdin__issue_7570(self):
['iquery'], 'STDOUT', [json_string], input=f"select COLL_NAME where COLL_NAME = '{self.user.session_collection}'")

def test_iquery_returns_error_on_invalid_zone__issue_7570(self):
ec, out, err = self.user.assert_icommand(['iquery', '-z', 'invalid_zone', 'select COLL_NAME'], 'STDOUT')
ec, out, err = self.user.assert_icommand_fail(['iquery', '-z', 'invalid_zone', 'select COLL_NAME'], 'STDOUT')
self.assertEqual(ec, 1)
self.assertEqual(len(out), 0)
self.assertEqual(err, 'error: -26000\n') # SYS_INVALID_ZONE_NAME

ec, out, err = self.user.assert_icommand(['iquery', '-z', '', 'select COLL_NAME'], 'STDOUT')
ec, out, err = self.user.assert_icommand_fail(['iquery', '-z', '', 'select COLL_NAME'], 'STDOUT')
self.assertEqual(ec, 1)
self.assertEqual(len(out), 0)
self.assertEqual(err, 'error: -26000\n') # SYS_INVALID_ZONE_NAME

ec, out, err = self.user.assert_icommand(['iquery', '-z', ' ', 'select COLL_NAME'], 'STDOUT')
ec, out, err = self.user.assert_icommand_fail(['iquery', '-z', ' ', 'select COLL_NAME'], 'STDOUT')
self.assertEqual(ec, 1)
self.assertEqual(len(out), 0)
self.assertEqual(err, 'error: -26000\n') # SYS_INVALID_ZONE_NAME

def test_iquery_returns_error_on_invalid_query_tokens__issue_7570(self):
ec, out, err = self.user.assert_icommand(['iquery', ' '], 'STDOUT')
ec, out, err = self.user.assert_icommand_fail(['iquery', ' '], 'STDOUT')
self.assertEqual(ec, 1)
self.assertEqual(len(out), 0)
self.assertEqual(err, 'error: -167000\n') # SYS_LIBRARY_ERROR

ec, out, err = self.user.assert_icommand(['iquery', 'select'], 'STDOUT')
ec, out, err = self.user.assert_icommand_fail(['iquery', 'select'], 'STDOUT')
self.assertEqual(ec, 1)
self.assertEqual(len(out), 0)
self.assertEqual(err, 'error: -167000\n') # SYS_LIBRARY_ERROR

ec, out, err = self.user.assert_icommand(['iquery', 'select INVALID_COLUMN'], 'STDOUT')
ec, out, err = self.user.assert_icommand_fail(['iquery', 'select INVALID_COLUMN'], 'STDOUT')
self.assertEqual(ec, 1)
self.assertEqual(len(out), 0)
self.assertEqual(err, 'error: -130000\n') # SYS_INVALID_INPUT_PARAM

0 comments on commit a23dae5

Please sign in to comment.