Commit 656da801 authored by Rafael Monnerat's avatar Rafael Monnerat

Disable Upgrade test for now

  This requires more work before continue.
parent 2ca2830d
......@@ -62,41 +62,47 @@ class SlapOSCloud(SavedTestSuite, ProjectTestSuite):
return self._updateFunctionalTestResponse(self.runUnitTest(full_test))
elif test == 'testSlapOSUpgradeInstanceWithOldDataFs':
old_data_path = None
for path in sys.path:
if path.endswith('/slapos-bin'):
old_data_path = os.path.join(path, 'test_data', test)
if not os.path.isdir(old_data_path):
return dict(
status_code=-1,
test_count=1,
failure_count=1,
stderr='%s does not exist or is not a directory' % old_data_path)
return dict(
status_code=-1,
test_count=1,
skip_count=1,
stderr='testSlapOSUpgradeInstanceWithOldDataFs is skiped for now.')
break
else:
return dict(
status_code=-1,
test_count=1,
failure_count=1,
stderr='slapos-bin repository not found in %s' % '\n'.join(sys.path))
instance_home = (self.instance and 'unit_test.%u' % self.instance
or 'unit_test')
import shutil
shutil.rmtree(instance_home, ignore_errors=True)
os.makedirs(os.path.join(instance_home, 'var'))
shutil.copyfile(os.path.join(old_data_path, 'Data.fs'),
os.path.join(instance_home, 'var', 'Data.fs'))
shutil.copyfile(os.path.join(old_data_path, 'dump.sql'),
os.path.join(instance_home, 'dump.sql'))
return ProjectTestSuite.runUnitTest(self,
'--load',
'--portal_id=erp5',
'--enable_full_indexing=portal_types,portal_property_sheets',
full_test)
# for path in sys.path:
# if path.endswith('/slapos-bin'):
# old_data_path = os.path.join(path, 'test_data', test)
# if not os.path.isdir(old_data_path):
# return dict(
# status_code=-1,
# test_count=1,
# failure_count=1,
# stderr='%s does not exist or is not a directory' % old_data_path)
#
# break
# else:
# return dict(
# status_code=-1,
# test_count=1,
# failure_count=1,
# stderr='slapos-bin repository not found in %s' % '\n'.join(sys.path))
#
# instance_home = (self.instance and 'unit_test.%u' % self.instance
# or 'unit_test')
# import shutil
# shutil.rmtree(instance_home, ignore_errors=True)
#
# os.makedirs(os.path.join(instance_home, 'var'))
# shutil.copyfile(os.path.join(old_data_path, 'Data.fs'),
# os.path.join(instance_home, 'var', 'Data.fs'))
# shutil.copyfile(os.path.join(old_data_path, 'dump.sql'),
# os.path.join(instance_home, 'dump.sql'))
#
# return ProjectTestSuite.runUnitTest(self,
# '--load',
# '--portal_id=erp5',
# '--enable_full_indexing=portal_types,portal_property_sheets',
# full_test)
#
return super(SlapOSCloud, self).run(full_test)
def _updateFunctionalTestResponse(self, status_dict):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment