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
15803b60
Commit
15803b60
authored
May 04, 2012
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Requesting destroyed hosting subscription does not return any document.
parent
0f92538f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
4 deletions
+54
-4
master/bt5/vifib_slapos_core_test/TestTemplateItem/testSlapOSCorePersonRequest.py
...core_test/TestTemplateItem/testSlapOSCorePersonRequest.py
+53
-3
master/bt5/vifib_slapos_core_test/bt/revision
master/bt5/vifib_slapos_core_test/bt/revision
+1
-1
No files found.
master/bt5/vifib_slapos_core_test/TestTemplateItem/testSlapOSCorePersonRequest.py
View file @
15803b60
...
@@ -214,7 +214,7 @@ class TestSlapOSCorePersonRequest(ERP5TypeTestCase):
...
@@ -214,7 +214,7 @@ class TestSlapOSCorePersonRequest(ERP5TypeTestCase):
state
=
"destroyed"
,
state
=
"destroyed"
,
)
)
hosting_subscription
=
person
.
REQUEST
.
get
(
'request_hosting_subscription'
)
hosting_subscription
=
person
.
REQUEST
.
get
(
'request_hosting_subscription'
)
self
.
assertEquals
(
"destroy_requested"
,
hosting_subscription
.
getSlapState
()
)
self
.
assertEquals
(
None
,
hosting_subscription
)
def
test_Person_requestSoftwareInstance_returnHostingSubscriptionUrl
(
self
):
def
test_Person_requestSoftwareInstance_returnHostingSubscriptionUrl
(
self
):
person
=
self
.
getPortalObject
().
ERP5Site_getAuthenticatedMemberPersonValue
()
person
=
self
.
getPortalObject
().
ERP5Site_getAuthenticatedMemberPersonValue
()
...
@@ -497,7 +497,7 @@ class TestSlapOSCorePersonRequest(ERP5TypeTestCase):
...
@@ -497,7 +497,7 @@ class TestSlapOSCorePersonRequest(ERP5TypeTestCase):
self
.
assertEquals
(
"stop_requested"
,
hosting_subscription2
.
getSlapState
())
self
.
assertEquals
(
"stop_requested"
,
hosting_subscription2
.
getSlapState
())
self
.
assertEquals
(
"validated"
,
hosting_subscription2
.
getValidationState
())
self
.
assertEquals
(
"validated"
,
hosting_subscription2
.
getValidationState
())
def
test_Person_requestSoftwareInstance_
noConflictWithD
eletedHostingSubscription
(
self
):
def
test_Person_requestSoftwareInstance_
d
eletedHostingSubscription
(
self
):
person
=
self
.
getPortalObject
().
ERP5Site_getAuthenticatedMemberPersonValue
()
person
=
self
.
getPortalObject
().
ERP5Site_getAuthenticatedMemberPersonValue
()
software_release
=
self
.
software_release
.
getUrlString
()
software_release
=
self
.
software_release
.
getUrlString
()
...
@@ -510,6 +510,19 @@ class TestSlapOSCorePersonRequest(ERP5TypeTestCase):
...
@@ -510,6 +510,19 @@ class TestSlapOSCorePersonRequest(ERP5TypeTestCase):
sla_xml
=
"test"
sla_xml
=
"test"
shared
=
True
shared
=
True
person
.
requestSoftwareInstance
(
software_release
=
software_release
,
software_title
=
software_title
,
software_type
=
software_type
,
instance_xml
=
instance_xml
,
sla_xml
=
sla_xml
,
shared
=
shared
,
state
=
"stopped"
,
)
hosting_subscription
=
person
.
REQUEST
.
get
(
'request_hosting_subscription'
)
transaction
.
commit
()
self
.
tic
()
person
.
requestSoftwareInstance
(
person
.
requestSoftwareInstance
(
software_release
=
software_release
,
software_release
=
software_release
,
software_title
=
software_title
,
software_title
=
software_title
,
...
@@ -519,7 +532,44 @@ class TestSlapOSCorePersonRequest(ERP5TypeTestCase):
...
@@ -519,7 +532,44 @@ class TestSlapOSCorePersonRequest(ERP5TypeTestCase):
shared
=
shared
,
shared
=
shared
,
state
=
"destroyed"
,
state
=
"destroyed"
,
)
)
hosting_subscription2
=
person
.
REQUEST
.
get
(
'request_hosting_subscription'
)
self
.
assertEquals
(
None
,
hosting_subscription2
)
self
.
assertEquals
(
"destroy_requested"
,
hosting_subscription
.
getSlapState
())
def
test_Person_requestSoftwareInstance_noConflictWithDeletedHostingSubscription
(
self
):
person
=
self
.
getPortalObject
().
ERP5Site_getAuthenticatedMemberPersonValue
()
software_release
=
self
.
software_release
.
getUrlString
()
software_title
=
"test"
software_type
=
"test"
instance_xml
=
"""<?xml version="1.0" encoding="utf-8"?>
<instance>
</instance>
"""
sla_xml
=
"test"
shared
=
True
person
.
requestSoftwareInstance
(
software_release
=
software_release
,
software_title
=
software_title
,
software_type
=
software_type
,
instance_xml
=
instance_xml
,
sla_xml
=
sla_xml
,
shared
=
shared
,
state
=
"stopped"
,
)
hosting_subscription
=
person
.
REQUEST
.
get
(
'request_hosting_subscription'
)
hosting_subscription
=
person
.
REQUEST
.
get
(
'request_hosting_subscription'
)
transaction
.
commit
()
self
.
tic
()
person
.
requestSoftwareInstance
(
software_release
=
software_release
,
software_title
=
software_title
,
software_type
=
software_type
,
instance_xml
=
instance_xml
,
sla_xml
=
sla_xml
,
shared
=
shared
,
state
=
"destroyed"
,
)
self
.
assertEquals
(
"destroy_requested"
,
hosting_subscription
.
getSlapState
())
self
.
assertEquals
(
"destroy_requested"
,
hosting_subscription
.
getSlapState
())
transaction
.
commit
()
transaction
.
commit
()
self
.
tic
()
self
.
tic
()
...
@@ -534,6 +584,6 @@ class TestSlapOSCorePersonRequest(ERP5TypeTestCase):
...
@@ -534,6 +584,6 @@ class TestSlapOSCorePersonRequest(ERP5TypeTestCase):
state
=
"started"
,
state
=
"started"
,
)
)
hosting_subscription2
=
person
.
REQUEST
.
get
(
'request_hosting_subscription'
)
hosting_subscription2
=
person
.
REQUEST
.
get
(
'request_hosting_subscription'
)
self
.
assertEquals
(
"started"
,
hosting_subscription2
.
getSlapState
())
self
.
assertEquals
(
"start
_request
ed"
,
hosting_subscription2
.
getSlapState
())
self
.
assertNotEquals
(
hosting_subscription
.
getRelativeUrl
(),
self
.
assertNotEquals
(
hosting_subscription
.
getRelativeUrl
(),
hosting_subscription2
.
getRelativeUrl
())
hosting_subscription2
.
getRelativeUrl
())
master/bt5/vifib_slapos_core_test/bt/revision
View file @
15803b60
5
6
\ 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