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
1
Merge Requests
1
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
Romain Courteaud
slapos.core
Commits
e9d766d3
Commit
e9d766d3
authored
Jan 13, 2023
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_erp5: drop test for Compute Partition and Software Release
parent
226c046e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
69 deletions
+0
-69
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
...l_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
+0
-69
No files found.
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
View file @
e9d766d3
...
...
@@ -269,56 +269,6 @@ class TestComputerNetworkModule(TestSlapOSGroupRoleSecurityMixin):
self
.
assertRoles
(
module
,
'R-SHADOW-PERSON'
,
[
'Auditor'
])
self
.
assertRoles
(
module
,
self
.
user_id
,
[
'Owner'
])
class
TestComputePartition
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_CustomerOfThePartition
(
self
):
partition
=
self
.
portal
.
compute_node_module
.
newContent
(
portal_type
=
'Compute Node'
).
newContent
(
portal_type
=
'Compute Partition'
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
partition
,
'busy'
)
self
.
commit
()
instance_customer_reference
=
'TESTPERSON-%s'
%
self
.
generateNewId
()
slave_customer_reference
=
'TESTPERSON-%s'
%
self
.
generateNewId
()
instance_customer
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
instance_customer_reference
)
slave_customer
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
reference
=
slave_customer_reference
)
instance_subscription_reference
=
'TESTHS-%s'
%
self
.
generateNewId
()
instance_subscription
=
self
.
portal
.
instance_tree_module
\
.
template_instance_tree
.
Base_createCloneDocument
(
batch_mode
=
1
)
instance_subscription
.
edit
(
destination_section
=
instance_customer
.
getRelativeUrl
(),
reference
=
instance_subscription_reference
)
instance
=
self
.
portal
.
software_instance_module
.
template_software_instance
\
.
Base_createCloneDocument
(
batch_mode
=
1
)
instance
.
edit
(
specialise
=
instance_subscription
.
getRelativeUrl
(),
aggregate
=
partition
.
getRelativeUrl
())
instance
.
validate
()
self
.
commit
()
slave_subscription
=
self
.
portal
.
instance_tree_module
\
.
template_instance_tree
.
Base_createCloneDocument
(
batch_mode
=
1
)
slave_subscription
.
edit
(
destination_section
=
slave_customer
.
getRelativeUrl
())
slave
=
self
.
portal
.
software_instance_module
.
template_slave_instance
\
.
Base_createCloneDocument
(
batch_mode
=
1
)
slave
.
validate
()
slave
.
edit
(
specialise
=
slave_subscription
.
getRelativeUrl
(),
aggregate
=
partition
.
getRelativeUrl
())
self
.
commit
()
partition
.
updateLocalRolesOnSecurityGroups
()
self
.
tic
()
self
.
assertSecurityGroup
(
partition
,
[
self
.
user_id
,
instance_customer
.
getUserId
(),
slave_customer
.
getUserId
(),
instance_subscription_reference
],
True
)
self
.
assertRoles
(
partition
,
instance_customer
.
getUserId
(),
[
'Auditor'
])
self
.
assertRoles
(
partition
,
slave_customer
.
getUserId
(),
[
'Auditor'
])
self
.
assertRoles
(
partition
,
instance_subscription_reference
,
[
'Auditor'
])
self
.
assertRoles
(
partition
,
self
.
user_id
,
[
'Owner'
])
test_SoftwareInstanceGroupRelatedToComputePartition
=
\
test_CustomerOfThePartition
class
TestCredentialUpdateModule
(
TestSlapOSGroupRoleSecurityMixin
):
def
test
(
self
):
...
...
@@ -969,25 +919,6 @@ class TestSoftwareProductModule(TestSlapOSGroupRoleSecurityMixin):
self
.
assertRoles
(
module
,
'F-PRODUCTION*'
,
[
'Auditor'
,
'Author'
])
self
.
assertRoles
(
module
,
self
.
user_id
,
[
'Owner'
])
class
TestSoftwareRelease
(
TestSlapOSGroupRoleSecurityMixin
):
def
test_GroupCompany
(
self
):
release
=
self
.
portal
.
software_release_module
.
newContent
(
portal_type
=
'Software Release'
)
release
.
updateLocalRolesOnSecurityGroups
()
self
.
assertSecurityGroup
(
release
,
[
'G-COMPANY'
,
self
.
user_id
],
False
)
self
.
assertRoles
(
release
,
'G-COMPANY'
,
[
'Assignor'
])
self
.
assertRoles
(
release
,
self
.
user_id
,
[
'Owner'
])
class
TestSoftwareReleaseModule
(
TestSlapOSGroupRoleSecurityMixin
):
def
test
(
self
):
module
=
self
.
portal
.
software_release_module
self
.
changeOwnership
(
module
)
self
.
assertSecurityGroup
(
module
,
[
'G-COMPANY'
,
'R-MEMBER'
,
self
.
user_id
],
False
)
self
.
assertRoles
(
module
,
'R-MEMBER'
,
[
'Auditor'
,
'Author'
])
self
.
assertRoles
(
module
,
'G-COMPANY'
,
[
'Auditor'
,
'Author'
])
self
.
assertRoles
(
module
,
self
.
user_id
,
[
'Owner'
])
class
TestOpenSaleOrderModule
(
TestSlapOSGroupRoleSecurityMixin
):
def
test
(
self
):
...
...
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