Commit c477c47e authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_accounting: Remove tests from removed code.

parent 8a31bd2d
......@@ -47,22 +47,16 @@
<value>
<tuple>
<string>W: 30, 10: Use of eval (eval-used)</string>
<string>W:350, 16: Unused variable \'update_line\' (unused-variable)</string>
<string>W:528, 20: Unused variable \'destroy_line\' (unused-variable)</string>
<string>W:588, 4: Unused variable \'setup_line\' (unused-variable)</string>
<string>W:649, 4: Unused variable \'setup_line\' (unused-variable)</string>
<string>W:688, 29: Unused variable \'destroy_line\' (unused-variable)</string>
<string>W:688, 4: Unused variable \'setup_line\' (unused-variable)</string>
<string>W:1364, 20: Use of eval (eval-used)</string>
<string>W:1365, 23: Use of eval (eval-used)</string>
<string>W:1386, 20: Use of eval (eval-used)</string>
<string>W:1387, 23: Use of eval (eval-used)</string>
<string>W:1452, 20: Use of eval (eval-used)</string>
<string>W:1453, 23: Use of eval (eval-used)</string>
<string>W:1462, 20: Use of eval (eval-used)</string>
<string>W:1463, 23: Use of eval (eval-used)</string>
<string>W:1526, 35: Use of eval (eval-used)</string>
<string>W:1527, 31: Use of eval (eval-used)</string>
<string>W:758, 20: Use of eval (eval-used)</string>
<string>W:759, 23: Use of eval (eval-used)</string>
<string>W:780, 20: Use of eval (eval-used)</string>
<string>W:781, 23: Use of eval (eval-used)</string>
<string>W:846, 20: Use of eval (eval-used)</string>
<string>W:847, 23: Use of eval (eval-used)</string>
<string>W:856, 20: Use of eval (eval-used)</string>
<string>W:857, 23: Use of eval (eval-used)</string>
<string>W:920, 35: Use of eval (eval-used)</string>
<string>W:921, 31: Use of eval (eval-used)</string>
</tuple>
</value>
</item>
......
......@@ -9,136 +9,6 @@ class TestSlapOSAccountingInteractionWorkflow(SlapOSTestCaseMixin):
def beforeTearDown(self):
transaction.abort()
def test_SlaveInstance_changePromise(self):
new_id = self.generateNewId()
instance = self.portal.software_instance_module.newContent(
portal_type='Slave Instance',
title="Instance %s" % new_id,
reference="TESTINST-%s" % new_id,
destination_reference="TESTINST-%s" % new_id,
)
instance.validate()
self.assertEqual(instance.getCausalityState(), 'diverged')
request_kw = dict(
software_release='http://example.org',
software_type='http://example.org',
instance_xml=self.generateSafeXml(),
sla_xml=self.generateSafeXml(),
shared=True,
)
instance.converge()
self.assertEqual(instance.getCausalityState(), 'solved')
instance.requestStop(**request_kw)
self.assertEqual(instance.getCausalityState(), 'diverged')
instance.converge()
self.assertEqual(instance.getCausalityState(), 'solved')
instance.requestStart(**request_kw)
self.assertEqual(instance.getCausalityState(), 'diverged')
instance.converge()
self.assertEqual(instance.getCausalityState(), 'solved')
instance.bang(comment='Test bang interaction', bang_tree=False)
self.assertEqual(instance.getCausalityState(), 'diverged')
instance.converge()
self.assertEqual(instance.getCausalityState(), 'solved')
instance.requestDestroy(**request_kw)
self.assertEqual(instance.getCausalityState(), 'diverged')
def test_SlaveInstance_changePromiseInDivergeState(self):
new_id = self.generateNewId()
instance = self.portal.software_instance_module.newContent(
portal_type='Slave Instance',
title="Instance %s" % new_id,
reference="TESTINST-%s" % new_id,
destination_reference="TESTINST-%s" % new_id,
)
instance.validate()
self.assertEqual(instance.getCausalityState(), 'diverged')
request_kw = dict(
software_release='http://example.org',
software_type='http://example.org',
instance_xml=self.generateSafeXml(),
sla_xml=self.generateSafeXml(),
shared=True,
)
instance.requestStop(**request_kw)
self.assertEqual(instance.getCausalityState(), 'diverged')
def test_SoftwareInstance_changePromise(self):
new_id = self.generateNewId()
instance = self.portal.software_instance_module.newContent(
portal_type='Software Instance',
title="Instance %s" % new_id,
reference="TESTINST-%s" % new_id,
destination_reference="TESTINST-%s" % new_id,
ssl_certificate="foo",
ssl_key="bar",
)
instance.validate()
self.assertEqual(instance.getCausalityState(), 'diverged')
request_kw = dict(
software_release='http://example.org',
software_type='http://example.org',
instance_xml=self.generateSafeXml(),
sla_xml=self.generateSafeXml(),
shared=False,
)
instance.converge()
self.assertEqual(instance.getCausalityState(), 'solved')
instance.requestStop(**request_kw)
self.assertEqual(instance.getCausalityState(), 'diverged')
instance.converge()
self.assertEqual(instance.getCausalityState(), 'solved')
instance.requestStart(**request_kw)
self.assertEqual(instance.getCausalityState(), 'diverged')
instance.converge()
self.assertEqual(instance.getCausalityState(), 'solved')
instance.bang(comment='Test bang interaction', bang_tree=False)
self.assertEqual(instance.getCausalityState(), 'diverged')
instance.converge()
self.assertEqual(instance.getCausalityState(), 'solved')
instance.requestDestroy(**request_kw)
self.assertEqual(instance.getCausalityState(), 'diverged')
def test_SoftwareInstance_changePromiseInDivergedState(self):
new_id = self.generateNewId()
instance = self.portal.software_instance_module.newContent(
portal_type='Software Instance',
title="Instance %s" % new_id,
reference="TESTINST-%s" % new_id,
destination_reference="TESTINST-%s" % new_id,
ssl_certificate="foo",
ssl_key="bar",
)
instance.validate()
self.assertEqual(instance.getCausalityState(), 'diverged')
request_kw = dict(
software_release='http://example.org',
software_type='http://example.org',
instance_xml=self.generateSafeXml(),
sla_xml=self.generateSafeXml(),
shared=False,
)
instance.requestStop(**request_kw)
self.assertEqual(instance.getCausalityState(), 'diverged')
def _simulateHostingSubscription_calculateSubscriptionStartDate(self, date):
script_name = 'HostingSubscription_calculateSubscriptionStartDate'
if script_name in self.portal.portal_skins.custom.objectIds():
......
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