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
Thomas Leymonerie
slapos.core
Commits
d933a42b
Commit
d933a42b
authored
Oct 25, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check Software Instance softwareInstanceRename with simulator.
parent
ae516dea
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
1 deletion
+28
-1
master/bt5/slapos_cloud/TestTemplateItem/testSlapOSSlapTool.py
...r/bt5/slapos_cloud/TestTemplateItem/testSlapOSSlapTool.py
+27
-0
master/bt5/slapos_cloud/bt/revision
master/bt5/slapos_cloud/bt/revision
+1
-1
No files found.
master/bt5/slapos_cloud/TestTemplateItem/testSlapOSSlapTool.py
View file @
d933a42b
...
...
@@ -1088,3 +1088,30 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin):
if
os
.
path
.
exists
(
self
.
instance_bang_simulator
):
os
.
unlink
(
self
.
instance_bang_simulator
)
def
assertInstanceRenameSimulator
(
self
,
args
,
kwargs
):
stored
=
eval
(
open
(
self
.
instance_rename_simulator
).
read
())
# do the same translation magic as in workflow
self
.
assertEqual
(
stored
,
[{
'recargs'
:
args
,
'reckwargs'
:
kwargs
,
'recmethod'
:
'rename'
}])
def
test_softwareInstanceRename
(
self
):
self
.
_makeComplexComputer
()
self
.
instance_rename_simulator
=
tempfile
.
mkstemp
()[
1
]
try
:
partition_id
=
self
.
start_requested_software_instance
.
getAggregateValue
(
portal_type
=
'Computer Partition'
).
getReference
()
self
.
login
(
self
.
start_requested_software_instance
.
getReference
())
self
.
start_requested_software_instance
.
rename
=
Simulator
(
self
.
instance_rename_simulator
,
'rename'
)
new_name
=
'new me'
response
=
self
.
portal_slap
.
softwareInstanceRename
(
new_name
,
self
.
computer_id
,
partition_id
)
self
.
assertEqual
(
'None'
,
response
)
self
.
assertInstanceRenameSimulator
((),
{
'comment'
:
'Rename %s into %s'
%
(
self
.
start_requested_software_instance
.
getTitle
(),
new_name
),
'new_name'
:
new_name
})
finally
:
if
os
.
path
.
exists
(
self
.
instance_rename_simulator
):
os
.
unlink
(
self
.
instance_rename_simulator
)
master/bt5/slapos_cloud/bt/revision
View file @
d933a42b
91
\ No newline at end of file
92
\ 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