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
Jérome Perrin
slapos.core
Commits
5ea5776c
Commit
5ea5776c
authored
Aug 13, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid testing impossible.
Damaging sla and instance xml is not possible anymore.
parent
bc20967a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
59 deletions
+1
-59
master/product/Vifib/tests/testVifibSlapComputerGetComputerPartitionList.py
...ib/tests/testVifibSlapComputerGetComputerPartitionList.py
+1
-59
No files found.
master/product/Vifib/tests/testVifibSlapComputerGetComputerPartitionList.py
View file @
5ea5776c
...
...
@@ -699,51 +699,12 @@ class TestVifibSlapComputerGetComputerPartitionList(TestVifibSlapWebServiceMixin
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
play
(
self
)
def
stepSetSoftwareInstanceValidConnectionXML
(
self
,
sequence
,
**
kw
):
software_instance
=
self
.
portal
.
portal_catalog
.
getResultValue
(
uid
=
sequence
[
'software_instance_uid'
])
software_instance
.
edit
(
connection_xml
=
""
)
def
stepDamageSoftwareInstanceSlaXml
(
self
,
sequence
,
**
kw
):
instance
=
self
.
portal
.
portal_catalog
.
getResultValue
(
uid
=
sequence
[
'software_instance_uid'
])
if
instance
.
getPortalType
()
==
"Software Instance"
:
shared
=
False
elif
instance
.
getPortalType
()
==
"Slave Instance"
:
shared
=
True
else
:
raise
NotImplementedError
self
.
assertRaises
(
ValidationFailed
,
instance
.
requestStart
,
software_release
=
instance
.
getRootSoftwareReleaseUrl
(),
instance_xml
=
instance
.
getTextContent
(),
software_type
=
instance
.
getSourceReference
(),
sla_xml
=
"""DAMAGED<BAD?xml XMLversion="1.0" encoding="utf-8"?>"""
,
shared
=
shared
,
)
def
stepDamageSoftwareInstanceConnectionXml
(
self
,
sequence
,
**
kw
):
instance
=
self
.
portal
.
portal_catalog
.
getResultValue
(
uid
=
sequence
[
'software_instance_uid'
])
instance
.
edit
(
connection_xml
=
"""
DAMAGED<BAD?xml XMLversion="1.0" encoding="utf-8"?>"""
)
def
stepDamageSoftwareInstanceXml
(
self
,
sequence
,
**
kw
):
instance
=
self
.
portal
.
portal_catalog
.
getResultValue
(
uid
=
sequence
[
'software_instance_uid'
])
if
instance
.
getPortalType
()
==
"Software Instance"
:
shared
=
False
elif
instance
.
getPortalType
()
==
"Slave Instance"
:
shared
=
True
else
:
raise
NotImplementedError
self
.
assertRaises
(
ValidationFailed
,
instance
.
requestStart
,
software_release
=
instance
.
getRootSoftwareReleaseUrl
(),
instance_xml
=
"""DAMAGED<BAD?xml XMLversion="1.0" encoding="utf-8"?>"""
,
software_type
=
instance
.
getSourceReference
(),
sla_xml
=
instance
.
getSlaXml
(),
shared
=
shared
,
)
def
stepCheckDamageSoftwareInstanceSiteConsistency
(
self
,
sequence
,
**
kw
):
software_instance
=
self
.
portal
.
portal_catalog
.
getResultValue
(
uid
=
sequence
[
'software_instance_uid'
])
...
...
@@ -756,7 +717,7 @@ class TestVifibSlapComputerGetComputerPartitionList(TestVifibSlapWebServiceMixin
consistency_error
=
consistency_error_list
[
0
]
self
.
assertEqual
(
consistency_error
.
getObject
().
getPath
(),
software_instance
.
getPath
())
self
.
assertTrue
(
'
Sla
XML is invalid'
in
str
(
consistency_error
.
getMessage
()))
self
.
assertTrue
(
'
Connection
XML is invalid'
in
str
(
consistency_error
.
getMessage
()))
self
.
assertTrue
(
self
.
portal
.
portal_alarms
.
vifib_check_consistency
.
sense
())
self
.
checkDivergency
()
...
...
@@ -766,15 +727,6 @@ class TestVifibSlapComputerGetComputerPartitionList(TestVifibSlapWebServiceMixin
sequence_list
=
SequenceList
()
sequence_string
=
self
\
.
prepare_install_requested_computer_partition_sequence_string
+
"""
LoginDefaultUser
DamageSoftwareInstanceXml
Logout
SlapLoginCurrentComputer
CheckSuccessComputerGetComputerPartitionCall
Tic
SlapLogout
LoginDefaultUser
SetSoftwareInstanceValidXML
DamageSoftwareInstanceConnectionXml
...
...
@@ -785,16 +737,6 @@ class TestVifibSlapComputerGetComputerPartitionList(TestVifibSlapWebServiceMixin
Tic
SlapLogout
LoginDefaultUser
SetSoftwareInstanceValidConnectionXML
DamageSoftwareInstanceSlaXml
Logout
SlapLoginCurrentComputer
CheckSuccessComputerGetComputerPartitionCall
Tic
SlapLogout
LoginERP5TypeTestCase
CheckDamageSoftwareInstanceSiteConsistency
Logout
...
...
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