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
Ophélie Gagnard
slapos.core
Commits
02788922
Commit
02788922
authored
Aug 02, 2014
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_pdm: Remove duplicated test.
parent
7377b316
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
23 deletions
+4
-23
master/bt5/slapos_pdm/TestTemplateItem/testSlapOSPDMAlarm.py
master/bt5/slapos_pdm/TestTemplateItem/testSlapOSPDMAlarm.py
+3
-22
master/bt5/slapos_pdm/bt/revision
master/bt5/slapos_pdm/bt/revision
+1
-1
No files found.
master/bt5/slapos_pdm/TestTemplateItem/testSlapOSPDMAlarm.py
View file @
02788922
...
@@ -50,7 +50,6 @@ return %s
...
@@ -50,7 +50,6 @@ return %s
"""
%
(
script_name
,
fake_return
))
"""
%
(
script_name
,
fake_return
))
transaction
.
commit
()
transaction
.
commit
()
def
_dropScript
(
self
,
script_name
):
def
_dropScript
(
self
,
script_name
):
if
script_name
in
self
.
portal
.
portal_skins
.
custom
.
objectIds
():
if
script_name
in
self
.
portal
.
portal_skins
.
custom
.
objectIds
():
self
.
portal
.
portal_skins
.
custom
.
manage_delObjects
(
script_name
)
self
.
portal
.
portal_skins
.
custom
.
manage_delObjects
(
script_name
)
...
@@ -61,33 +60,16 @@ return %s
...
@@ -61,33 +60,16 @@ return %s
upgrade_decision
.
start
()
upgrade_decision
.
start
()
self
.
tic
()
self
.
tic
()
self
.
_simulateScript
(
'UpgradeDecision_
upgradeHostingSubscription
'
,
'True'
)
self
.
_simulateScript
(
'UpgradeDecision_
processUpgrade
'
,
'True'
)
try
:
try
:
self
.
portal
.
portal_alarms
.
slapos_pdm_upgrade_decision_process_started
.
activeSense
()
self
.
portal
.
portal_alarms
.
slapos_pdm_upgrade_decision_process_started
.
activeSense
()
self
.
tic
()
self
.
tic
()
finally
:
finally
:
self
.
_dropScript
(
'UpgradeDecision_
upgradeHostingSubscription
'
)
self
.
_dropScript
(
'UpgradeDecision_
processUpgrade
'
)
self
.
assertEqual
(
self
.
assertEqual
(
'Visited by UpgradeDecision_
upgradeHostingSubscription
'
,
'Visited by UpgradeDecision_
processUpgrade
'
,
upgrade_decision
.
workflow_history
[
'edit_workflow'
][
-
1
][
'comment'
])
upgrade_decision
.
workflow_history
[
'edit_workflow'
][
-
1
][
'comment'
])
def
test_alarm_upgrade_decision_process_computer
(
self
):
upgrade_decision
=
self
.
_makeUpgradeDecision
()
upgrade_decision
.
start
()
self
.
tic
()
self
.
_simulateScript
(
'UpgradeDecision_upgradeHostingSubscription'
,
'False'
)
self
.
_simulateScript
(
'UpgradeDecision_upgradeComputer'
,
'True'
)
try
:
self
.
portal
.
portal_alarms
.
slapos_pdm_upgrade_decision_process_started
.
activeSense
()
self
.
tic
()
finally
:
self
.
_dropScript
(
'UpgradeDecision_upgradeHostingSubscription'
)
self
.
_dropScript
(
'UpgradeDecision_upgradeComputer'
)
self
.
assertEqual
(
'Visited by UpgradeDecision_upgradeComputer'
,
upgrade_decision
.
workflow_history
[
'edit_workflow'
][
-
1
][
'comment'
])
def
test_alarm_upgrade_decision_process_planned
(
self
):
def
test_alarm_upgrade_decision_process_planned
(
self
):
upgrade_decision
=
self
.
_makeUpgradeDecision
(
confirm
=
0
)
upgrade_decision
=
self
.
_makeUpgradeDecision
(
confirm
=
0
)
upgrade_decision
.
plan
()
upgrade_decision
.
plan
()
...
@@ -132,7 +114,6 @@ return %s
...
@@ -132,7 +114,6 @@ return %s
computer2
.
edit
(
allocation_scope
=
'open/personal'
)
computer2
.
edit
(
allocation_scope
=
'open/personal'
)
self
.
_simulateScript
(
'Computer_hostingSubscriptionCreateUpgradeDecision'
)
self
.
_simulateScript
(
'Computer_hostingSubscriptionCreateUpgradeDecision'
)
try
:
try
:
self
.
portal
.
portal_alarms
.
slapos_pdm_hosting_subscription_create_upgrade_decision
.
\
self
.
portal
.
portal_alarms
.
slapos_pdm_hosting_subscription_create_upgrade_decision
.
\
activeSense
()
activeSense
()
...
...
master/bt5/slapos_pdm/bt/revision
View file @
02788922
23
24
\ No newline at end of file
\ 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