diff --git a/Makefile b/Makefile index 2ebdafd2..427374dd 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ # ------------------------------------------------------------------------------ PACKAGE := osg-test -VERSION := 1.10.1 +VERSION := 1.11.0 # ------------------------------------------------------------------------------ diff --git a/files/test_sequence b/files/test_sequence index 82ef30f8..bdd8e24c 100644 --- a/files/test_sequence +++ b/files/test_sequence @@ -20,7 +20,6 @@ test_23_gratia test_24_tomcat test_25_voms_admin test_26_bestman -test_27_osg_info_services test_28_gsiopenssh test_29_slurm test_30_misc @@ -42,8 +41,6 @@ test_58_gfal2util test_53_gums test_54_gratia test_55_condorce -test_56_lcgutil -test_57_osg_info_services test_59_gsiopenssh test_74_slurm test_75_gums @@ -52,7 +49,6 @@ test_77_myproxy test_78_voms test_79_condorce test_80_gratia -test_81_osg_info_services test_82_cvmfs test_83_rsv test_84_xrootd diff --git a/osgtest/tests/test_27_osg_info_services.py b/osgtest/tests/test_27_osg_info_services.py deleted file mode 100644 index 302513e4..00000000 --- a/osgtest/tests/test_27_osg_info_services.py +++ /dev/null @@ -1,266 +0,0 @@ -import os -import tempfile - -import osgtest.library.core as core -import osgtest.library.files as files -import osgtest.library.osgunittest as osgunittest - -class TestStartOSGInfoServices(osgunittest.OSGTestCase): - - #possible_rpms = ['osg-ce-condor', - # 'osg-ce-pbs', - # 'osg-ce-lsf',] - possible_rpms = ['osg-ce', - 'htcondor-ce'] - def test_01_config_certs(self): - core.skip_ok_unless_installed('osg-info-services') - core.skip_ok_unless_one_installed(*self.possible_rpms) - core.config['certs.httpcert'] = '/etc/grid-security/http/httpcert.pem' - core.config['certs.httpkey'] = '/etc/grid-security/http/httpkey.pem' - - def test_02_install_http_certs(self): - core.skip_ok_unless_installed('osg-info-services') - core.skip_ok_unless_one_installed(*self.possible_rpms) - httpcert = core.config['certs.httpcert'] - httpkey = core.config['certs.httpkey'] - self.skip_ok_if(core.check_file_and_perms(httpcert, 'tomcat', 0644) and - core.check_file_and_perms(httpkey, 'tomcat', 0400), - 'HTTP cert exists and has proper permissions') - core.install_cert('certs.httpcert', 'certs.hostcert', 'tomcat', 0644) - core.install_cert('certs.httpkey', 'certs.hostkey', 'tomcat', 0400) - - def test_03_create_app_dir_structure(self): - core.skip_ok_unless_installed('osg-info-services') - core.skip_ok_unless_one_installed(*self.possible_rpms) - temp_dir = tempfile.mkdtemp(suffix='osg-info-services') - core.config['osg-info-services.tmp-dir-suffix'] = temp_dir - os.mkdir(temp_dir + '/osg') - os.mkdir(temp_dir + '/osg/app_dir') - os.mkdir(temp_dir + '/osg/app_dir/etc') - os.mkdir(temp_dir + '/osg/data_dir') - - def test_04_config_storage_file(self): - core.skip_ok_unless_installed('osg-info-services') - core.skip_ok_unless_one_installed(*self.possible_rpms) - core.config['osg-info-services.storage-file'] = '/etc/osg/config.d/10-storage.ini' - temp_dir = core.config['osg-info-services.tmp-dir-suffix'] - files.replace_regexpr(core.config['osg-info-services.storage-file'], - 'app_dir = *', - 'app_dir = ' + temp_dir + '/osg/app_dir', - owner='root') - files.replace_regexpr(core.config['osg-info-services.storage-file'], - 'data_dir = *', - 'data_dir = ' + temp_dir + '/osg/data_dir', - backup=False) - - def test_05_config_squid_file(self): - core.skip_ok_unless_installed('osg-info-services') - core.skip_ok_unless_one_installed(*self.possible_rpms) - core.config['osg-info-services.squid-file'] = '/etc/osg/config.d/01-squid.ini' - files.replace_regexpr(core.config['osg-info-services.squid-file'], - 'location = *', - 'location = UNAVAILABLE', - owner='root') - - def test_06_config_misc_file(self): - core.skip_ok_unless_installed('osg-info-services') - core.skip_ok_unless_one_installed(*self.possible_rpms) - core.config['osg-info-services.misc-file'] = '/etc/osg/config.d/10-misc.ini' - files.replace(core.config['osg-info-services.misc-file'], - 'gums_host = DEFAULT', - 'gums_host = ' + core.get_hostname(), - owner='root') - - def test_07_config_gip_file(self): - core.skip_ok_unless_installed('osg-info-services') - core.skip_ok_unless_one_installed(*self.possible_rpms) - core.config['osg-info-services.gip-file'] = '/etc/osg/config.d/30-gip.ini' - files.append(core.config['osg-info-services.gip-file'], - "[Subcluster fermicloud osg test]\n", - owner='root') - files.append(core.config['osg-info-services.gip-file'], - "name = fermicloud osg test\n", - backup=False) - files.append(core.config['osg-info-services.gip-file'], - "node_count = 1\n", - backup=False) - files.append(core.config['osg-info-services.gip-file'], - "ram_mb = 4110\n", - backup=False) - files.append(core.config['osg-info-services.gip-file'], - "swap_mb = 4000\n", - backup=False) - files.append(core.config['osg-info-services.gip-file'], - "cpu_model = Dual-Core AMD Opteron(tm) Processor 2216\n", - backup=False) - files.append(core.config['osg-info-services.gip-file'], - "cpu_vendor = AMD\n", - backup=False) - files.append(core.config['osg-info-services.gip-file'], - "cpu_speed_mhz = 2400\n", - backup=False) - files.append(core.config['osg-info-services.gip-file'], - "cpus_per_node = 2\n", - backup=False) - files.append(core.config['osg-info-services.gip-file'], - "cores_per_node = 2\n", - backup=False) - files.append(core.config['osg-info-services.gip-file'], - "inbound_network = FALSE\n", - backup=False) - files.append(core.config['osg-info-services.gip-file'], - "outbound_network = TRUE\n", - backup=False) - files.append(core.config['osg-info-services.gip-file'], - "cpu_platform = x86_64\n", - backup=False) - - def test_08_config_site_info_file(self): - core.skip_ok_unless_installed('osg-info-services') - core.skip_ok_unless_one_installed(*self.possible_rpms) - core.config['osg-info-services.siteinfo-file'] = '/etc/osg/config.d/40-siteinfo.ini' - files.replace(core.config['osg-info-services.siteinfo-file'], - 'group = OSG', - 'group = OSG-ITB', - owner='root') - files.replace_regexpr(core.config['osg-info-services.siteinfo-file'], - 'host_name = *', - 'host_name = ' + core.get_hostname(), - backup=False) - files.replace(core.config['osg-info-services.siteinfo-file'], - 'sponsor = UNAVAILABLE', - 'sponsor = mis:100', - backup=False) - files.replace(core.config['osg-info-services.siteinfo-file'], - 'contact = UNAVAILABLE', - 'contact = Lando Calrissian', - backup=False) - files.replace(core.config['osg-info-services.siteinfo-file'], - 'email = UNAVAILABLE', - 'email = lcalrissian@milleniumfalcon.com', - backup=False) - files.replace(core.config['osg-info-services.siteinfo-file'], - 'city = UNAVAILABLE', - 'city = Cloud City', - backup=False) - files.replace(core.config['osg-info-services.siteinfo-file'], - 'country = UNAVAILABLE', - 'country = Bespin', - backup=False) - files.replace_regexpr(core.config['osg-info-services.siteinfo-file'], - 'longitude =*', - 'longitude = -1', - backup=False) - files.replace(core.config['osg-info-services.siteinfo-file'], - 'latitude = UNAVAILABLE', - 'latitude = 45', - backup=False) - - def test_09_config_user_vo_map(self): - # Configurations for the user_vo_map - core.skip_ok_unless_installed('osg-info-services') - core.skip_ok_unless_one_installed(*self.possible_rpms) - user_vo_map_file = '/var/lib/osg/user-vo-map' - core.config['osg-info-services.user-vo-map'] = user_vo_map_file - if files.filesBackedup(user_vo_map_file, 'root'): - files.append(core.config['osg-info-services.user-vo-map'], - core.options.username + ' mis', - backup=False) - else: - files.append(core.config['osg-info-services.user-vo-map'], - core.options.username + ' mis', - owner='root') - # append creates files with 0600 by default so fix that - os.chmod(user_vo_map_file, 0644) - - def test_10_config_condor(self): - # Configurations needed if bath system is condor. - core.config['osg-info-services.condor-file'] = '/etc/osg/config.d/20-condor.ini' - core.skip_ok_unless_installed(['osg-info-services', 'osg-ce-condor']) - files.replace_regexpr(core.config['osg-info-services.condor-file'], - 'enabled = *', - 'enabled = True', - owner='root') - files.replace_regexpr(core.config['osg-info-services.gip-file'], - 'batch = *', - 'batch = condor', - backup=False) - - def test_11_config_pbs(self): - # Configuration needed if batch system is pbs - core.skip_ok_unless_installed(['osg-info-services', 'osg-ce-pbs']) - core.config['osg-info-services.pbs-file'] = '/etc/osg/config.d/20-pbs.ini' - files.replace_regexpr(core.config['osg-info-services.pbs-file'], - 'enabled = *', - 'enabled = True', - owner='root') - files.replace_regexpr(core.config['osg-info-services.gip-file'], - 'batch = *', - 'batch = pbs', - backup=False) - - def test_12_config_lsf(self): - # Configuration needed if batch system is lsf - core.skip_ok_unless_installed(['osg-info-services', 'osg-ce-lsf']) - core.config['osg-info-services.lsf-file'] = '/etc/osg/config.d/20-lsf.ini' - files.replace_regexpr(core.config['osg-info-services.lsf-file'], - 'enabled = *', - 'enabled = True', - owner='root') - files.replace_regexpr(core.config['osg-info-services.gip-file'], - 'batch = *', - 'batch = lsf', - backup=False) - - def test_13_config_sge(self): - # Configuration needed if batch system is sge - core.skip_ok_unless_installed(['osg-info-services', 'osg-ce-sge']) - core.config['osg-info-services.sge-file'] = '/etc/osg/config.d/20-sge.ini' - files.replace_regexpr(core.config['osg-info-services.sge-file'], - 'enabled = *', - 'enabled = True', - owner='root') - files.replace_regexpr(core.config['osg-info-services.sge-file'], - 'sge_root = *', - 'sge_root = /usr/share/gridengine', - backup=False) - os.environ['SGE_ROOT'] = '/usr/share/gridengine' - files.replace_regexpr(core.config['osg-info-services.sge-file'], - 'sge_bin_location = *', - 'sge_bin_location = /usr/share/gridengine/bin', - backup=False) - files.replace_regexpr(core.config['osg-info-services.gip-file'], - 'batch = *', - 'batch = sge', - backup=False) - - def test_14_config_gram_gateway(self): - core.config['osg-info-services.gateway-file'] = '/etc/osg/config.d/10-gateway.ini' - core.skip_ok_unless_installed(['osg-info-services', 'osg-ce']) - files.replace_regexpr(core.config['osg-info-services.gateway-file'], - 'gram_gateway_enabled = *', - 'gram_gateway_enabled = True', - owner='root') - - def test_15_config_htcondor_gateway(self): - core.skip_ok_unless_installed(['osg-info-services', 'htcondor-ce']) - if 'osg-info-services.gateway-file' in core.config: - files.replace_regexpr(core.config['osg-info-services.gateway-file'], - 'htcondor_gateway_enabled = *', - 'htcondor_gateway_enabled = True', - backup=False) - else: - core.config['osg-info-services.gateway-file'] = '/etc/osg/config.d/10-gateway.ini' - files.replace_regexpr(core.config['osg-info-services.gateway-file'], - 'htcondor_gateway_enabled = *', - 'htcondor_gateway_enabled = True', - owner='root') - - def test_16_config_gratia_file(self): - core.skip_ok_unless_one_installed(*self.possible_rpms) - core.skip_ok_unless_installed('osg-info-services') - core.config['osg-info-services.gratia-file'] = '/etc/osg/config.d/30-gratia.ini' - files.replace_regexpr(core.config['osg-info-services.gratia-file'], - 'enabled = *', - 'enabled = False', - owner='root') diff --git a/osgtest/tests/test_30_misc.py b/osgtest/tests/test_30_misc.py index 481ff740..c6a71b73 100644 --- a/osgtest/tests/test_30_misc.py +++ b/osgtest/tests/test_30_misc.py @@ -39,28 +39,3 @@ def test_02_osg_version(self): osg_version_rpm_version = matches.group(1) self.assert_(osg_version == osg_version_rpm_version) - def test_03_lfc_multilib(self): - # We do not ship lfc-* in OSG 3.3 - self.skip_ok_if(core.osg_release().split('.') >= ['3','3'], message='OSG 3.3+') - # We do not build 32-bit packages on EL7 - self.skip_ok_if(core.el_release() >= 7, message='running on EL7+') - - core.skip_ok_unless_installed('yum-utils') - - # We can't test this on 32-bit - uname_out, _, _ = core.check_system(['uname', '-i'], 'getting arch') - self.skip_ok_if(re.search(r'i\d86', uname_out), message='running on 32-bit') - - cmdbase = ['repoquery', '--plugins'] - for repo in core.options.extrarepos: - cmdbase.append('--enablerepo=%s' % repo) - - # Find the 32-bit lfc-python rpm - stdout, _, _ = core.check_system(cmdbase + ['lfc-python.i386'], 'lfc-python multilib (32bit)') - if stdout.strip() == '': - self.fail('32-bit lfc-python not found in 64-bit repo') - - # Sanity check: find the 64-bit lfc-python rpm - stdout, _, _ = core.check_system(cmdbase + ['lfc-python.x86_64'], 'lfc-python multilib (64bit)') - if stdout.strip() == '': - self.fail('64-bit lfc-python not found in 64-bit repo') diff --git a/osgtest/tests/test_56_lcgutil.py b/osgtest/tests/test_56_lcgutil.py deleted file mode 100644 index 8ed0b49b..00000000 --- a/osgtest/tests/test_56_lcgutil.py +++ /dev/null @@ -1,60 +0,0 @@ -import os -import osgtest.library.core as core -import osgtest.library.files as files -import osgtest.library.osgunittest as osgunittest -import socket -import tempfile -import unittest - -class TestLCGUtil(osgunittest.OSGTestCase): - - __data_path = '/usr/share/osg-test/test_gridftp_data.txt' - __port = '10443' - __sfn = 'srm/v2/server' - __hostname = socket.getfqdn() - - - def setUp(self): - self.skip_ok_unless(core.state['proxy.created'] or core.state['voms.got-proxy']) - core.skip_ok_unless_installed('bestman2-server', 'lcg-util') - self.skip_bad_unless(core.state['bestman.server-running'], 'bestman server not running') - - def get_srm_url_base(self): - return 'srm://%s:%s/%s?SFN=' % (TestLCGUtil.__hostname, TestLCGUtil.__port, TestLCGUtil.__sfn) - - def get_srm_url(self): - return self.get_srm_url_base() + TestLCGUtil.__remote_path - - def setup_temp_paths(self): - TestLCGUtil.__temp_dir = tempfile.mkdtemp() - TestLCGUtil.__remote_path = TestLCGUtil.__temp_dir + '/lcgutil_put_copied_file.txt' - TestLCGUtil.__local_path = TestLCGUtil.__temp_dir + '/lcgutil_get_copied_file.txt' - - def test_01_copy_local_to_server_lcg_util(self): - self.setup_temp_paths() - os.chmod(TestLCGUtil.__temp_dir, 0777) - command = ('lcg-cp', '-v', '-b', '-D', 'srmv2', 'file://' + TestLCGUtil.__data_path, self.get_srm_url()) - status, stdout, stderr = core.system(command, True) - fail = core.diagnose('lcg-util copy, local to URL', command, status, stdout, stderr) - file_copied = os.path.exists(TestLCGUtil.__remote_path) - self.assertEqual(status, 0, fail) - self.assert_(file_copied, 'Copied file missing') - - def test_02_copy_server_to_local_lcg_util(self): - command = ('lcg-cp', '-v', '-b', '-D', 'srmv2', self.get_srm_url(), 'file://' + TestLCGUtil.__local_path) - status, stdout, stderr = core.system(command, True) - fail = core.diagnose('lcg-util copy, URL to local', command, status, stdout, stderr) - file_copied = os.path.exists(TestLCGUtil.__local_path) - self.assertEqual(status, 0, fail) - self.assert_(file_copied, 'Copied file missing') - files.remove(TestLCGUtil.__local_path) - - def test_03_remove_server_file_lcg_util(self): - command = ('lcg-del', '-v', '-b', '-l', '-D', 'srmv2', self.get_srm_url()) - status, stdout, stderr = core.system(command, True) - fail = core.diagnose('lcg-util remove, URL file', command, status, stdout, stderr) - file_removed = not os.path.exists(TestLCGUtil.__remote_path) - self.assertEqual(status, 0, fail) - self.assert_(file_removed, 'Copied file still exists') - files.remove(TestLCGUtil.__temp_dir) - diff --git a/osgtest/tests/test_57_osg_info_services.py b/osgtest/tests/test_57_osg_info_services.py deleted file mode 100644 index f98a5e68..00000000 --- a/osgtest/tests/test_57_osg_info_services.py +++ /dev/null @@ -1,25 +0,0 @@ -import osgtest.library.core as core -import osgtest.library.osgunittest as osgunittest - -class TestOSGInfoServices(osgunittest.OSGTestCase): - - possible_rpms = ['osg-ce', - 'htcondor-ce'] - def test_01_osg_configure_v(self): - core.skip_ok_unless_installed('osg-info-services') - core.skip_ok_unless_one_installed(*self.possible_rpms) - command = ('osg-configure', '-v') - core.check_system(command, 'osg-configure -v') - - def test_02_osg_configure_c(self): - core.skip_ok_unless_installed('osg-info-services') - core.skip_ok_unless_one_installed(*self.possible_rpms) - command = ('osg-configure', '-c') - core.check_system(command, 'osg-configure -c') - - def test_03_osg_info_services(self): - core.skip_ok_unless_installed('osg-info-services') - core.skip_ok_unless_one_installed(*self.possible_rpms) - command = ('osg-info-services', '--dryrun') - core.check_system(command,'osg-info-services dry run') - diff --git a/osgtest/tests/test_81_osg_info_services.py b/osgtest/tests/test_81_osg_info_services.py deleted file mode 100644 index 7a3eaea0..00000000 --- a/osgtest/tests/test_81_osg_info_services.py +++ /dev/null @@ -1,48 +0,0 @@ -import osgtest.library.core as core -import osgtest.library.files as files -import osgtest.library.osgunittest as osgunittest - -class TestStopOSGInfoServices(osgunittest.OSGTestCase): - - possible_rpms = ['osg-ce', - 'htcondor-ce'] - - def test_01_restore_basic_configFile(self): - core.skip_ok_unless_installed('osg-info-services') - core.skip_ok_unless_one_installed(*self.possible_rpms) - files.restore(core.config['osg-info-services.storage-file'], 'root') - files.restore(core.config['osg-info-services.squid-file'], 'root') - files.restore(core.config['osg-info-services.misc-file'], 'root') - files.restore(core.config['osg-info-services.gip-file'], 'root') - files.restore(core.config['osg-info-services.siteinfo-file'], 'root') - files.restore(core.config['osg-info-services.gratia-file'], 'root') - files.restore(core.config['osg-info-services.gateway-file'], 'root') - - def test_02_restore_condor_configFile(self): - core.skip_ok_unless_installed(['osg-info-services', 'osg-ce-condor']) - files.restore(core.config['osg-info-services.condor-file'], 'root') - - def test_03_restore_pbs_configFile(self): - core.skip_ok_unless_installed(['osg-info-services', 'osg-ce-pbs']) - files.restore(core.config['osg-info-services.pbs-file'], 'root') - - def test_04_restore_lsf_configFile(self): - core.skip_ok_unless_installed(['osg-info-services', 'osg-ce-lsf']) - files.restore(core.config['osg-info-services.lsf-file'], 'root') - - def test_05_restore_sge_configFile(self): - core.skip_ok_unless_installed(['osg-info-services', 'osg-ce-sge']) - files.restore(core.config['osg-info-services.sge-file'], 'root') - - def test_06_delete_temporary_appdir_structure(self): - core.skip_ok_unless_installed('osg-info-services') - core.skip_ok_unless_one_installed(*self.possible_rpms) - command = ('rm', '-rf', core.config['osg-info-services.tmp-dir-suffix']) - core.check_system(command, 'remove temporary app_dir structure %s' % core.config['osg-info-services.tmp-dir-suffix']) - - def test_07_restore_user_vo_map_file(self): - core.skip_ok_unless_installed('osg-info-services') - core.skip_ok_unless_one_installed(*self.possible_rpms) - if files.filesBackedup(core.config['osg-info-services.user-vo-map'], 'root'): - files.restore(core.config['osg-info-services.user-vo-map'], 'root') -