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
Léo-Paul Géneau
slapos.core
Commits
5affd3d0
Commit
5affd3d0
authored
Oct 31, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test instance.unallocatePartition
parent
33656de8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
1 deletion
+34
-1
master/bt5/slapos_cloud/TestTemplateItem/testSlapOSCoreInstanceSlapInterfaceWorkflow.py
...mplateItem/testSlapOSCoreInstanceSlapInterfaceWorkflow.py
+33
-0
master/bt5/slapos_cloud/bt/revision
master/bt5/slapos_cloud/bt/revision
+1
-1
No files found.
master/bt5/slapos_cloud/TestTemplateItem/testSlapOSCoreInstanceSlapInterfaceWorkflow.py
View file @
5affd3d0
...
...
@@ -91,6 +91,39 @@ class TestSlapOSCoreInstanceSlapInterfaceWorkflow(testSlapOSMixin):
computer_partition_url
=
computer_partition_url
)
self
.
assertEqual
(
self
.
instance
.
getAggregate
(),
computer_partition_url
)
def
test_unallocatePartition
(
self
):
computer
=
self
.
portal
.
computer_module
.
template_computer
\
.
Base_createCloneDocument
(
batch_mode
=
1
)
computer
.
validate
()
computer_partition
=
computer
.
newContent
(
portal_type
=
'Computer Partition'
)
computer_partition
.
validate
()
computer_partition
.
markFree
()
computer_partition_url
=
computer_partition
.
getRelativeUrl
()
self
.
instance
.
allocatePartition
(
computer_partition_url
=
computer_partition_url
)
self
.
assertEqual
(
self
.
instance
.
getAggregate
(),
computer_partition_url
)
self
.
instance
.
requestDestroy
(
**
self
.
request_kw
)
self
.
instance
.
unallocatePartition
()
self
.
assertEqual
(
None
,
self
.
instance
.
getAggregate
())
def
test_unallocatePartition_twice
(
self
):
computer
=
self
.
portal
.
computer_module
.
template_computer
\
.
Base_createCloneDocument
(
batch_mode
=
1
)
computer
.
validate
()
computer_partition
=
computer
.
newContent
(
portal_type
=
'Computer Partition'
)
computer_partition
.
validate
()
computer_partition
.
markFree
()
computer_partition_url
=
computer_partition
.
getRelativeUrl
()
self
.
instance
.
allocatePartition
(
computer_partition_url
=
computer_partition_url
)
self
.
assertEqual
(
self
.
instance
.
getAggregate
(),
computer_partition_url
)
self
.
instance
.
requestDestroy
(
**
self
.
request_kw
)
self
.
instance
.
unallocatePartition
()
self
.
assertEqual
(
None
,
self
.
instance
.
getAggregate
())
self
.
assertRaises
(
AssertionError
,
self
.
instance
.
unallocatePartition
)
def
test_rename_new_name_required
(
self
):
self
.
login
(
self
.
instance
.
getReference
())
self
.
assertRaises
(
KeyError
,
self
.
instance
.
rename
)
...
...
master/bt5/slapos_cloud/bt/revision
View file @
5affd3d0
176
\ No newline at end of file
177
\ No newline at end of file
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