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
Boxiang Sun
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):
...
@@ -62,41 +62,47 @@ class SlapOSCloud(SavedTestSuite, ProjectTestSuite):
return
self
.
_updateFunctionalTestResponse
(
self
.
runUnitTest
(
full_test
))
return
self
.
_updateFunctionalTestResponse
(
self
.
runUnitTest
(
full_test
))
elif
test
==
'testSlapOSUpgradeInstanceWithOldDataFs'
:
elif
test
==
'testSlapOSUpgradeInstanceWithOldDataFs'
:
old_data_path
=
None
old_data_path
=
None
for
path
in
sys
.
path
:
return
dict
(
if
path
.
endswith
(
'/slapos-bin'
):
status_code
=-
1
,
old_data_path
=
os
.
path
.
join
(
path
,
'test_data'
,
test
)
test_count
=
1
,
if
not
os
.
path
.
isdir
(
old_data_path
):
skip_count
=
1
,
return
dict
(
stderr
=
'testSlapOSUpgradeInstanceWithOldDataFs is skiped for now.'
)
status_code
=-
1
,
test_count
=
1
,
failure_count
=
1
,
stderr
=
'%s does not exist or is not a directory'
%
old_data_path
)
break
# for path in sys.path:
else
:
# if path.endswith('/slapos-bin'):
return
dict
(
# old_data_path = os.path.join(path, 'test_data', test)
status_code
=-
1
,
# if not os.path.isdir(old_data_path):
test_count
=
1
,
# return dict(
failure_count
=
1
,
# status_code=-1,
stderr
=
'slapos-bin repository not found in %s'
%
'
\
n
'
.
join
(
sys
.
path
))
# test_count=1,
# failure_count=1,
instance_home
=
(
self
.
instance
and
'unit_test.%u'
%
self
.
instance
# stderr='%s does not exist or is not a directory' % old_data_path)
or
'unit_test'
)
#
import
shutil
# break
shutil
.
rmtree
(
instance_home
,
ignore_errors
=
True
)
# else:
# return dict(
os
.
makedirs
(
os
.
path
.
join
(
instance_home
,
'var'
))
# status_code=-1,
shutil
.
copyfile
(
os
.
path
.
join
(
old_data_path
,
'Data.fs'
),
# test_count=1,
os
.
path
.
join
(
instance_home
,
'var'
,
'Data.fs'
))
# failure_count=1,
shutil
.
copyfile
(
os
.
path
.
join
(
old_data_path
,
'dump.sql'
),
# stderr='slapos-bin repository not found in %s' % '\n'.join(sys.path))
os
.
path
.
join
(
instance_home
,
'dump.sql'
))
#
# instance_home = (self.instance and 'unit_test.%u' % self.instance
return
ProjectTestSuite
.
runUnitTest
(
self
,
# or 'unit_test')
'--load'
,
# import shutil
'--portal_id=erp5'
,
# shutil.rmtree(instance_home, ignore_errors=True)
'--enable_full_indexing=portal_types,portal_property_sheets'
,
#
full_test
)
# 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
)
return
super
(
SlapOSCloud
,
self
).
run
(
full_test
)
def
_updateFunctionalTestResponse
(
self
,
status_dict
):
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