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
Nicolas Wavrant
slapos.core
Commits
80da396a
Commit
80da396a
authored
Oct 03, 2018
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_slap_tool: Clean up comments which seems to be from a copy and paste
parent
8d407893
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
118 deletions
+0
-118
master/bt5/slapos_slap_tool/TestTemplateItem/portal_components/test.erp5.testSlapOSSlapToolComputerUpdateFromDict.py
...nts/test.erp5.testSlapOSSlapToolComputerUpdateFromDict.py
+0
-118
No files found.
master/bt5/slapos_slap_tool/TestTemplateItem/portal_components/test.erp5.testSlapOSSlapToolComputerUpdateFromDict.py
View file @
80da396a
...
@@ -980,121 +980,3 @@ class TestSlapOSCoreComputerUpdateFromDict(SlapOSTestCaseMixinWithAbort):
...
@@ -980,121 +980,3 @@ class TestSlapOSCoreComputerUpdateFromDict(SlapOSTestCaseMixinWithAbort):
self
.
assertEqual
(
partition
.
getValidationState
(),
'invalidated'
)
self
.
assertEqual
(
partition
.
getValidationState
(),
'invalidated'
)
self
.
assertEqual
(
partition
.
getSlapState
(),
'inactive'
)
self
.
assertEqual
(
partition
.
getSlapState
(),
'inactive'
)
self
.
assertEqual
(
partition
.
getId
(),
'bar'
)
self
.
assertEqual
(
partition
.
getId
(),
'bar'
)
# def test_Computer_checkAndUpdateCapacityScope_no_capacity_quantity(self):
# self._makeTree()
# self.computer.edit(capacity_quantity=1)
# partition = self.computer.newContent(portal_type='Computer Partition',
# reference='part1')
# partition.markFree()
# partition.markBusy()
# partition.validate()
# self.software_instance.setAggregate(partition.getRelativeUrl())
# self.tic()
#
# self.computer.Computer_checkAndUpdateCapacityScope()
# self.assertEqual('close', self.computer.getCapacityScope())
# self.assertEqual('Computer capacity limit exceeded',
# self.computer.workflow_history['edit_workflow'][-1]['comment'])
#
# def test_Computer_checkAndUpdateCapacityScope_no_access(self):
# self.computer.edit(reference='TESTC-%s' % self.generateNewId())
# self.computer.Computer_checkAndUpdateCapacityScope()
# self.assertEqual('close', self.computer.getCapacityScope())
# self.assertEqual("Computer didn't contact the server",
# self.computer.workflow_history['edit_workflow'][-1]['comment'])
#
# def test_Computer_checkAndUpdateCapacityScope_close(self):
# self.computer.edit(capacity_scope='close')
# self.computer.Computer_checkAndUpdateCapacityScope()
# self.assertEqual('open', self.computer.getCapacityScope())
#
# def test_Computer_checkAndUpdateCapacityScope_with_error(self):
# memcached_dict = self.portal.portal_memcached.getMemcachedDict(
# key_prefix='slap_tool',
# plugin_path='portal_memcached/default_memcached_plugin')
# memcached_dict[self.computer.getReference()] = json.dumps({
# 'text': '#error not ok'
# })
# self.computer.Computer_checkAndUpdateCapacityScope()
# self.assertEqual('close', self.computer.getCapacityScope())
# self.assertEqual("Computer reported an error",
# self.computer.workflow_history['edit_workflow'][-1]['comment'])
#
# def test_Computer_checkAndUpdateCapacityScope_with_error_non_public(self):
# memcached_dict = self.portal.portal_memcached.getMemcachedDict(
# key_prefix='slap_tool',
# plugin_path='portal_memcached/default_memcached_plugin')
# memcached_dict[self.computer.getReference()] = json.dumps({
# 'text': '#error not ok'
# })
# self.computer.edit(allocation_scope='open/personal')
# self.computer.Computer_checkAndUpdateCapacityScope()
# self.assertEqual('open', self.computer.getCapacityScope())
#
# def _simulateComputer_checkAndUpdateCapacityScope(self):
# script_name = 'Computer_checkAndUpdateCapacityScope'
# if script_name in self.portal.portal_skins.custom.objectIds():
# raise ValueError('Precondition failed: %s exists in custom' % script_name)
# createZODBPythonScript(self.portal.portal_skins.custom,
# script_name,
# '*args, **kwargs',
# '# Script body\n'
# """portal_workflow = context.portal_workflow
# portal_workflow.doActionFor(context, action='edit_action', comment='Visited by Computer_checkAndUpdateCapacityScope') """ )
# transaction.commit()
#
# def _dropComputer_checkAndUpdateCapacityScope(self):
# script_name = 'Computer_checkAndUpdateCapacityScope'
# if script_name in self.portal.portal_skins.custom.objectIds():
# self.portal.portal_skins.custom.manage_delObjects(script_name)
# transaction.commit()
#
# def test_alarm(self):
# self._simulateComputer_checkAndUpdateCapacityScope()
# try:
# self.portal.portal_alarms.slapos_update_computer_capacity_scope.activeSense()
# self.tic()
# finally:
# self._dropComputer_checkAndUpdateCapacityScope()
# self.assertEqual(
# 'Visited by Computer_checkAndUpdateCapacityScope',
# self.computer.workflow_history['edit_workflow'][-1]['comment'])
#
# def test_alarm_non_public(self):
# self.computer.edit(allocation_scope='open/personal')
# self.tic()
# self._simulateComputer_checkAndUpdateCapacityScope()
# try:
# self.portal.portal_alarms.slapos_update_computer_capacity_scope.activeSense()
# self.tic()
# finally:
# self._dropComputer_checkAndUpdateCapacityScope()
# self.assertNotEqual(
# 'Visited by Computer_checkAndUpdateCapacityScope',
# self.computer.workflow_history['edit_workflow'][-1]['comment'])
#
# def test_alarm_invalidated(self):
# self.computer.invalidate()
# self.tic()
# self._simulateComputer_checkAndUpdateCapacityScope()
# try:
# self.portal.portal_alarms.slapos_update_computer_capacity_scope.activeSense()
# self.tic()
# finally:
# self._dropComputer_checkAndUpdateCapacityScope()
# self.assertNotEqual(
# 'Visited by Computer_checkAndUpdateCapacityScope',
# self.computer.workflow_history['edit_workflow'][-1]['comment'])
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