Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Carlos Ramos Carreño
slapos.core
Commits
656da801
Commit
656da801
authored
Aug 26, 2020
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable Upgrade test for now
This requires more work before continue.
parent
2ca2830d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
34 deletions
+40
-34
master/tests/__init__.py
master/tests/__init__.py
+40
-34
No files found.
master/tests/__init__.py
View file @
656da801
...
...
@@ -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
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment