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
893641c2
Commit
893641c2
authored
Nov 05, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test constraint in SlapOS cloud configuration.
parent
9ef4b3bb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
1 deletion
+42
-1
master/bt5/slapos_cloud/TestTemplateItem/testSlapOSCoreConstraint.py
...slapos_cloud/TestTemplateItem/testSlapOSCoreConstraint.py
+40
-0
master/bt5/slapos_cloud/bt/revision
master/bt5/slapos_cloud/bt/revision
+1
-1
master/bt5/slapos_cloud/bt/template_test_id_list
master/bt5/slapos_cloud/bt/template_test_id_list
+1
-0
No files found.
master/bt5/slapos_cloud/TestTemplateItem/testSlapOSCoreConstraint.py
0 → 100644
View file @
893641c2
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2012 Nexedi SA and Contributors. All Rights Reserved.
#
##############################################################################
from
Products.SlapOS.tests.testSlapOSMixin
import
\
testSlapOSMixin
def
getMessageList
(
o
):
return
[
str
(
q
.
getMessage
())
for
q
in
o
.
checkConsistency
()]
class
TestSlapOSSoftwareInstanceConstraint
(
testSlapOSMixin
):
def
test_sla_xml
(
self
):
software_instance
=
self
.
portal
.
software_instance_module
.
newContent
(
portal_type
=
'Software Instance'
)
# fetch basic list of consistency messages
current_message_list
=
getMessageList
(
software_instance
)
consistency_message
=
"Sla XML is invalid: Start tag expected, '<' not "
\
"found, line 1, column 1"
# test the test: no expected message found
self
.
assertFalse
(
consistency_message
in
current_message_list
)
software_instance
.
edit
(
sla_xml
=
'this is bad xml'
)
self
.
assertTrue
(
consistency_message
in
getMessageList
(
software_instance
))
software_instance
.
edit
(
sla_xml
=
self
.
generateEmptyXml
())
self
.
assertFalse
(
consistency_message
in
getMessageList
(
software_instance
))
self
.
assertSameSet
(
current_message_list
,
getMessageList
(
software_instance
))
software_instance
.
edit
(
sla_xml
=
None
)
self
.
assertFalse
(
consistency_message
in
getMessageList
(
software_instance
))
self
.
assertSameSet
(
current_message_list
,
getMessageList
(
software_instance
))
software_instance
.
edit
(
sla_xml
=
''
)
self
.
assertFalse
(
consistency_message
in
getMessageList
(
software_instance
))
self
.
assertSameSet
(
current_message_list
,
getMessageList
(
software_instance
))
master/bt5/slapos_cloud/bt/revision
View file @
893641c2
187
\ No newline at end of file
188
\ No newline at end of file
master/bt5/slapos_cloud/bt/template_test_id_list
View file @
893641c2
testSlapOSCoreComputerPartitionSlapInterfaceWorkflow
testSlapOSCoreComputerSlapInterfaceWorkflow
testSlapOSCoreConstraint
testSlapOSCoreInstanceSlapInterfaceWorkflow
testSlapOSCorePersonSlapInterfaceWorkflow
testSlapOSCoreSlapOSAllocateInstanceAlarm
...
...
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