Commit 022c1052 authored by Łukasz Nowak's avatar Łukasz Nowak Committed by Antoine Catton

Revert "add test to check that one Software Instance can view and access one...

Revert "add test to check that one Software Instance can view and access one Slave Instance on the same tree"

This reverts commit 99d861b6e7bce745732ef8c07377768c8663932e.

This case is covered by test test_ComputerPartition_request_SlaveInstance_twiceDifferentParent
parent aa457b55
...@@ -683,110 +683,6 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin): ...@@ -683,110 +683,6 @@ class TestVifibSlapWebServiceSlaveInstance(TestVifibSlapWebServiceMixin):
""" """
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self)
def test_SlaveInstance_security_related_Hosting_Subscription(self):
"""
Check that one Software Instance can view and access one Slave Instance
requested by the root Software Instance
This test is reproducing scenario:
Master
/ \
/ \
SoftwareInstance SlaveInstance
"""
self.computer_partition_amount = 2
sequence_list = SequenceList()
sequence_string = self.prepare_install_requested_computer_partition_sequence_string + """
LoginDefaultUser
SetRootSoftwareInstanceCurrentInstance
SelectRequestedReference
SelectEmptyRequestedParameterDict
Logout
SlapLoginCurrentSoftwareInstance
RequestSlaveInstanceFromComputerPartition
Tic
CheckRaisesNotFoundComputerPartitionParameterDict
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
Logout
RequestSlaveInstanceFromComputerPartition
Tic
SlapLogout
SlapLoginCurrentComputer
SoftwareInstanceAvailable
Tic
LoginDefaultUser
StartSoftwareInstanceFromCurrentComputerPartition
Logout
Tic
SoftwareInstanceStarted
Tic
CheckEmptyComputerGetComputerPartitionCall
SlapLogout
LoginDefaultUser
SelectRequestedReferenceChildrenA
Logout
SlapLoginCurrentSoftwareInstance
RequestComputerPartition
Tic
CheckRaisesNotFoundComputerPartitionParameterDict
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
RequestComputerPartition
Tic
SetChildrenAComputerPartition
SetCurrentPersonSlapRequestedSoftwareInstance
SetSelectedComputerPartition
SlapLoginCurrentComputer
SoftwareInstanceAvailable
Tic
StartSoftwareInstanceFromCurrentComputerPartition
Tic
SoftwareInstanceStarted
Tic
CheckEmptyComputerGetComputerPartitionCall
SlapLogout
LoginDefaultUser
CheckCurrentSoftwareInstanceCanViewSlaveInstanceOnTree
CheckCurrentSoftwareInstanceCanAccessSlaveInstanceOnTree
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def _getSlaveInstanceRelatedCurrentHostingSubscription(self, reference):
portal_catalog = self.portal.portal_catalog
software_instance = portal_catalog.getResultValue(
reference=reference)
hosting_subscription = software_instance.getAggregateRelatedValue(
portal_type="Sale Packing List Line").getAggregateValue(
portal_type=self.hosting_subscription_portal_type)
packing_list = portal_catalog.getResultValue(
portal_type=self.sale_packing_list_line_portal_type,
aggregate_uid=hosting_subscription.getUid(),
aggregate_portal_type=self.slave_instance_portal_type)
return packing_list.getAggregateValue(
portal_type=self.slave_instance_portal_type)
def stepCheckCurrentSoftwareInstanceCanViewSlaveInstanceOnTree(self, sequence):
username = sequence["software_instance_reference"]
slave_instance = self._getSlaveInstanceRelatedCurrentHostingSubscription(
username)
self.assertUserCanViewDocument(username,
slave_instance)
def stepCheckCurrentSoftwareInstanceCanAccessSlaveInstanceOnTree(self, sequence):
username = sequence["software_instance_reference"]
slave_instance = self._getSlaveInstanceRelatedCurrentHostingSubscription(
username)
self.assertUserCanAccessDocument(username,
slave_instance)
def test_suite(): def test_suite():
suite = unittest.TestSuite() suite = unittest.TestSuite()
......
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