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
Titouan Soulard
slapos.core
Commits
405bf76f
Commit
405bf76f
authored
Aug 14, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Proof that too long tag will fail.
parent
97970ea3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
3 deletions
+52
-3
master/product/Vifib/tests/testVifibSlapComputerPartitionUpdate.py
...oduct/Vifib/tests/testVifibSlapComputerPartitionUpdate.py
+52
-3
No files found.
master/product/Vifib/tests/testVifibSlapComputerPartitionUpdate.py
View file @
405bf76f
...
@@ -4,6 +4,8 @@ from testVifibSlapWebService import TestVifibSlapWebServiceMixin
...
@@ -4,6 +4,8 @@ from testVifibSlapWebService import TestVifibSlapWebServiceMixin
from
random
import
random
from
random
import
random
from
Products.ERP5Type.tests.backportUnittest
import
skip
from
Products.ERP5Type.tests.backportUnittest
import
skip
from
Products.ERP5Type.Errors
import
UnsupportedWorkflowMethod
from
Products.ERP5Type.Errors
import
UnsupportedWorkflowMethod
import
transaction
from
_mysql_exceptions
import
DataError
class
TestVifibSlapComputerPartitionUpdate
(
TestVifibSlapWebServiceMixin
):
class
TestVifibSlapComputerPartitionUpdate
(
TestVifibSlapWebServiceMixin
):
def
stepRequestSoftwareInstanceUpdate
(
self
,
sequence
,
**
kw
):
def
stepRequestSoftwareInstanceUpdate
(
self
,
sequence
,
**
kw
):
...
@@ -467,18 +469,33 @@ class TestVifibSlapComputerPartitionUpdate(TestVifibSlapWebServiceMixin):
...
@@ -467,18 +469,33 @@ class TestVifibSlapComputerPartitionUpdate(TestVifibSlapWebServiceMixin):
person
=
self
.
portal
.
ERP5Site_getAuthenticatedMemberPersonValue
()
person
=
self
.
portal
.
ERP5Site_getAuthenticatedMemberPersonValue
()
software_release
=
self
.
portal
.
portal_catalog
.
getResultValue
(
software_release
=
self
.
portal
.
portal_catalog
.
getResultValue
(
uid
=
sequence
[
'software_release_uid'
])
uid
=
sequence
[
'software_release_uid'
])
software_title
=
self
.
id
()
+
str
(
random
())
person
.
requestSoftwareInstance
(
person
.
requestSoftwareInstance
(
software_release
=
software_release
.
getUrlString
(),
software_release
=
software_release
.
getUrlString
(),
software_title
=
s
oftwar
e_title
,
software_title
=
s
elf
.
root_software_instanc
e_title
,
software_type
=
"RootSoftwareInstance"
,
software_type
=
"RootSoftwareInstance"
,
instance_xml
=
self
.
minimal_correct_xml
,
instance_xml
=
self
.
minimal_correct_xml
,
sla_xml
=
""
,
sla_xml
=
""
,
shared
=
False
,
shared
=
False
,
state
=
"started"
)
state
=
"started"
)
sequence
.
edit
(
root_software_instance_title
=
software_title
)
sequence
.
edit
(
root_software_instance_title
=
self
.
root_software_instance_title
)
def
stepPersonRequestSoftwareInstanceNoTicRaisesDataError
(
self
,
sequence
,
**
kw
):
person
=
self
.
portal
.
ERP5Site_getAuthenticatedMemberPersonValue
()
software_release
=
self
.
portal
.
portal_catalog
.
getResultValue
(
uid
=
sequence
[
'software_release_uid'
])
person
.
requestSoftwareInstance
(
software_release
=
software_release
.
getUrlString
(),
software_title
=
self
.
root_software_instance_title
,
software_type
=
"RootSoftwareInstance"
,
instance_xml
=
self
.
minimal_correct_xml
,
sla_xml
=
""
,
shared
=
False
,
state
=
"started"
)
self
.
assertRaises
(
DataError
,
self
.
commit
)
transaction
.
abort
()
def
test_update_not_created_person_request_in_progress
(
self
):
def
test_update_not_created_person_request_in_progress
(
self
):
self
.
root_software_instance_title
=
self
.
id
()
+
str
(
random
())
sequence_list
=
SequenceList
()
sequence_list
=
SequenceList
()
sequence_string
=
self
.
prepare_published_software_release
+
\
sequence_string
=
self
.
prepare_published_software_release
+
\
self
.
prepare_formated_computer
+
"""
self
.
prepare_formated_computer
+
"""
...
@@ -512,6 +529,38 @@ class TestVifibSlapComputerPartitionUpdate(TestVifibSlapWebServiceMixin):
...
@@ -512,6 +529,38 @@ class TestVifibSlapComputerPartitionUpdate(TestVifibSlapWebServiceMixin):
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
play
(
self
)
sequence_list
.
play
(
self
)
def
test_update_not_created_person_request_in_progress_long_title
(
self
):
self
.
root_software_instance_title
=
'a'
*
256
# longer then SQL column size
sequence_list
=
SequenceList
()
sequence_string
=
self
.
prepare_published_software_release
+
\
self
.
prepare_formated_computer
+
"""
LoginTestVifibAdmin
RequestSoftwareInstallation
Tic
Logout
SlapLoginCurrentComputer
ComputerSoftwareReleaseAvailable
Tic
SlapLogout
LoginTestVifibCustomer
PersonRequestSoftwareInstanceNoTicRaisesDataError
Logout
# and this that test finishes
# it is proven that person data are begin in progress
# but there is no way to request software instance update as...
# ...it does not exists yet
LoginERP5TypeTestCase
CheckSiteConsistency
Logout
"""
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
play
(
self
)
def
test_suite
():
def
test_suite
():
suite
=
unittest
.
TestSuite
()
suite
=
unittest
.
TestSuite
()
suite
.
addTest
(
unittest
.
makeSuite
(
TestVifibSlapComputerPartitionUpdate
))
suite
.
addTest
(
unittest
.
makeSuite
(
TestVifibSlapComputerPartitionUpdate
))
...
...
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