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
Nicolas Wavrant
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
Show 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
...
@@ -699,51 +699,12 @@ class TestVifibSlapComputerGetComputerPartitionList(TestVifibSlapWebServiceMixin
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
play
(
self
)
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
):
def
stepDamageSoftwareInstanceConnectionXml
(
self
,
sequence
,
**
kw
):
instance
=
self
.
portal
.
portal_catalog
.
getResultValue
(
instance
=
self
.
portal
.
portal_catalog
.
getResultValue
(
uid
=
sequence
[
'software_instance_uid'
])
uid
=
sequence
[
'software_instance_uid'
])
instance
.
edit
(
connection_xml
=
"""
instance
.
edit
(
connection_xml
=
"""
DAMAGED<BAD?xml XMLversion="1.0" encoding="utf-8"?>"""
)
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
):
def
stepCheckDamageSoftwareInstanceSiteConsistency
(
self
,
sequence
,
**
kw
):
software_instance
=
self
.
portal
.
portal_catalog
.
getResultValue
(
software_instance
=
self
.
portal
.
portal_catalog
.
getResultValue
(
uid
=
sequence
[
'software_instance_uid'
])
uid
=
sequence
[
'software_instance_uid'
])
...
@@ -756,7 +717,7 @@ class TestVifibSlapComputerGetComputerPartitionList(TestVifibSlapWebServiceMixin
...
@@ -756,7 +717,7 @@ class TestVifibSlapComputerGetComputerPartitionList(TestVifibSlapWebServiceMixin
consistency_error
=
consistency_error_list
[
0
]
consistency_error
=
consistency_error_list
[
0
]
self
.
assertEqual
(
consistency_error
.
getObject
().
getPath
(),
self
.
assertEqual
(
consistency_error
.
getObject
().
getPath
(),
software_instance
.
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
.
assertTrue
(
self
.
portal
.
portal_alarms
.
vifib_check_consistency
.
sense
())
self
.
checkDivergency
()
self
.
checkDivergency
()
...
@@ -766,15 +727,6 @@ class TestVifibSlapComputerGetComputerPartitionList(TestVifibSlapWebServiceMixin
...
@@ -766,15 +727,6 @@ class TestVifibSlapComputerGetComputerPartitionList(TestVifibSlapWebServiceMixin
sequence_list
=
SequenceList
()
sequence_list
=
SequenceList
()
sequence_string
=
self
\
sequence_string
=
self
\
.
prepare_install_requested_computer_partition_sequence_string
+
"""
.
prepare_install_requested_computer_partition_sequence_string
+
"""
LoginDefaultUser
DamageSoftwareInstanceXml
Logout
SlapLoginCurrentComputer
CheckSuccessComputerGetComputerPartitionCall
Tic
SlapLogout
LoginDefaultUser
LoginDefaultUser
SetSoftwareInstanceValidXML
SetSoftwareInstanceValidXML
DamageSoftwareInstanceConnectionXml
DamageSoftwareInstanceConnectionXml
...
@@ -785,16 +737,6 @@ class TestVifibSlapComputerGetComputerPartitionList(TestVifibSlapWebServiceMixin
...
@@ -785,16 +737,6 @@ class TestVifibSlapComputerGetComputerPartitionList(TestVifibSlapWebServiceMixin
Tic
Tic
SlapLogout
SlapLogout
LoginDefaultUser
SetSoftwareInstanceValidConnectionXML
DamageSoftwareInstanceSlaXml
Logout
SlapLoginCurrentComputer
CheckSuccessComputerGetComputerPartitionCall
Tic
SlapLogout
LoginERP5TypeTestCase
LoginERP5TypeTestCase
CheckDamageSoftwareInstanceSiteConsistency
CheckDamageSoftwareInstanceSiteConsistency
Logout
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