Skip to content

Commit

Permalink
[#2211,#2212,#2213] Testing fixes
Browse files Browse the repository at this point in the history
Replace all instances of assertEquals with assertEqual
Do not install unittest-xml-reporting==1.14.0
Version-sniff to avoid upgrading pip on Ubuntu 24 and later
  • Loading branch information
FifthPotato authored and alanking committed Aug 22, 2024
1 parent c459c27 commit adda59c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions irods_consortium_continuous_integration_test_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ def get_package_type():
return pt

def install_test_prerequisites():
irods_python_ci_utilities.subprocess_get_output(['sudo', 'python3', '-m', 'pip', 'install', '--upgrade', 'pip>=20.3.4'], check_rc=True)
if distro.id() != "ubuntu" or int(distro.major_version()) < 24:
irods_python_ci_utilities.subprocess_get_output(['sudo', 'python3', '-m', 'pip', 'install', '--upgrade', 'pip>=20.3.4'], check_rc=True)
irods_python_ci_utilities.subprocess_get_output(['sudo', 'python3', '-m', 'pip', 'install', 'boto3', '--upgrade'], check_rc=True)

# Minio 7.1.17 imports the annontations module which only exists in Python 3.7 and beyond.
Expand All @@ -42,7 +43,6 @@ def install_test_prerequisites():
minio_version = '==7.1.16' if sys.hexversion < 0x030700F0 else ''
irods_python_ci_utilities.subprocess_get_output(['sudo', 'python3', '-m', 'pip', 'install', 'minio' + minio_version, '--upgrade'], check_rc=True)

irods_python_ci_utilities.subprocess_get_output(['sudo', '-EH', 'python3', '-m', 'pip', 'install', 'unittest-xml-reporting==1.14.0'])

def download_and_start_minio_server():
path_to_minio = os.path.abspath('minio')
Expand Down
2 changes: 1 addition & 1 deletion packaging/resource_suite_s3_nocache.py
Original file line number Diff line number Diff line change
Expand Up @@ -1602,7 +1602,7 @@ def test_recursive_register_from_s3_bucket(self):

self.admin.assert_icommand("ireg -r /%s/basedir %s/basedir" % (self.s3bucketname, self.admin.session_collection))
file_count = self.admin.run_icommand('''iquest "%s" "SELECT count(DATA_ID) where COLL_NAME like '%/basedir%'"''')[0]
self.assertEquals(file_count, u'9\n')
self.assertEqual(file_count, u'9\n')

def test_copy_file_greater_than_chunk_size(self):

Expand Down

0 comments on commit adda59c

Please sign in to comment.