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
Labels
Merge Requests
21
Merge Requests
21
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos.core
Commits
c477c47e
Commit
c477c47e
authored
Jul 25, 2018
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_accounting: Remove tests from removed code.
parent
8a31bd2d
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
752 deletions
+10
-752
master/bt5/slapos_accounting/TestTemplateItem/portal_components/test.erp5.testSlapOSAccountingAlarm.py
.../portal_components/test.erp5.testSlapOSAccountingAlarm.py
+0
-606
master/bt5/slapos_accounting/TestTemplateItem/portal_components/test.erp5.testSlapOSAccountingAlarm.xml
...portal_components/test.erp5.testSlapOSAccountingAlarm.xml
+10
-16
master/bt5/slapos_accounting/TestTemplateItem/portal_components/test.erp5.testSlapOSAccountingInteractionWorkflow.py
...ents/test.erp5.testSlapOSAccountingInteractionWorkflow.py
+0
-130
No files found.
master/bt5/slapos_accounting/TestTemplateItem/portal_components/test.erp5.testSlapOSAccountingAlarm.py
View file @
c477c47e
This diff is collapsed.
Click to expand it.
master/bt5/slapos_accounting/TestTemplateItem/portal_components/test.erp5.testSlapOSAccountingAlarm.xml
View file @
c477c47e
...
...
@@ -47,22 +47,16 @@
<value>
<tuple>
<string>
W: 30, 10: Use of eval (eval-used)
</string>
<string>
W:350, 16: Unused variable \'update_line\' (unused-variable)
</string>
<string>
W:528, 20: Unused variable \'destroy_line\' (unused-variable)
</string>
<string>
W:588, 4: Unused variable \'setup_line\' (unused-variable)
</string>
<string>
W:649, 4: Unused variable \'setup_line\' (unused-variable)
</string>
<string>
W:688, 29: Unused variable \'destroy_line\' (unused-variable)
</string>
<string>
W:688, 4: Unused variable \'setup_line\' (unused-variable)
</string>
<string>
W:1364, 20: Use of eval (eval-used)
</string>
<string>
W:1365, 23: Use of eval (eval-used)
</string>
<string>
W:1386, 20: Use of eval (eval-used)
</string>
<string>
W:1387, 23: Use of eval (eval-used)
</string>
<string>
W:1452, 20: Use of eval (eval-used)
</string>
<string>
W:1453, 23: Use of eval (eval-used)
</string>
<string>
W:1462, 20: Use of eval (eval-used)
</string>
<string>
W:1463, 23: Use of eval (eval-used)
</string>
<string>
W:1526, 35: Use of eval (eval-used)
</string>
<string>
W:1527, 31: Use of eval (eval-used)
</string>
<string>
W:758, 20: Use of eval (eval-used)
</string>
<string>
W:759, 23: Use of eval (eval-used)
</string>
<string>
W:780, 20: Use of eval (eval-used)
</string>
<string>
W:781, 23: Use of eval (eval-used)
</string>
<string>
W:846, 20: Use of eval (eval-used)
</string>
<string>
W:847, 23: Use of eval (eval-used)
</string>
<string>
W:856, 20: Use of eval (eval-used)
</string>
<string>
W:857, 23: Use of eval (eval-used)
</string>
<string>
W:920, 35: Use of eval (eval-used)
</string>
<string>
W:921, 31: Use of eval (eval-used)
</string>
</tuple>
</value>
</item>
...
...
master/bt5/slapos_accounting/TestTemplateItem/portal_components/test.erp5.testSlapOSAccountingInteractionWorkflow.py
View file @
c477c47e
...
...
@@ -9,136 +9,6 @@ class TestSlapOSAccountingInteractionWorkflow(SlapOSTestCaseMixin):
def
beforeTearDown
(
self
):
transaction
.
abort
()
def
test_SlaveInstance_changePromise
(
self
):
new_id
=
self
.
generateNewId
()
instance
=
self
.
portal
.
software_instance_module
.
newContent
(
portal_type
=
'Slave Instance'
,
title
=
"Instance %s"
%
new_id
,
reference
=
"TESTINST-%s"
%
new_id
,
destination_reference
=
"TESTINST-%s"
%
new_id
,
)
instance
.
validate
()
self
.
assertEqual
(
instance
.
getCausalityState
(),
'diverged'
)
request_kw
=
dict
(
software_release
=
'http://example.org'
,
software_type
=
'http://example.org'
,
instance_xml
=
self
.
generateSafeXml
(),
sla_xml
=
self
.
generateSafeXml
(),
shared
=
True
,
)
instance
.
converge
()
self
.
assertEqual
(
instance
.
getCausalityState
(),
'solved'
)
instance
.
requestStop
(
**
request_kw
)
self
.
assertEqual
(
instance
.
getCausalityState
(),
'diverged'
)
instance
.
converge
()
self
.
assertEqual
(
instance
.
getCausalityState
(),
'solved'
)
instance
.
requestStart
(
**
request_kw
)
self
.
assertEqual
(
instance
.
getCausalityState
(),
'diverged'
)
instance
.
converge
()
self
.
assertEqual
(
instance
.
getCausalityState
(),
'solved'
)
instance
.
bang
(
comment
=
'Test bang interaction'
,
bang_tree
=
False
)
self
.
assertEqual
(
instance
.
getCausalityState
(),
'diverged'
)
instance
.
converge
()
self
.
assertEqual
(
instance
.
getCausalityState
(),
'solved'
)
instance
.
requestDestroy
(
**
request_kw
)
self
.
assertEqual
(
instance
.
getCausalityState
(),
'diverged'
)
def
test_SlaveInstance_changePromiseInDivergeState
(
self
):
new_id
=
self
.
generateNewId
()
instance
=
self
.
portal
.
software_instance_module
.
newContent
(
portal_type
=
'Slave Instance'
,
title
=
"Instance %s"
%
new_id
,
reference
=
"TESTINST-%s"
%
new_id
,
destination_reference
=
"TESTINST-%s"
%
new_id
,
)
instance
.
validate
()
self
.
assertEqual
(
instance
.
getCausalityState
(),
'diverged'
)
request_kw
=
dict
(
software_release
=
'http://example.org'
,
software_type
=
'http://example.org'
,
instance_xml
=
self
.
generateSafeXml
(),
sla_xml
=
self
.
generateSafeXml
(),
shared
=
True
,
)
instance
.
requestStop
(
**
request_kw
)
self
.
assertEqual
(
instance
.
getCausalityState
(),
'diverged'
)
def
test_SoftwareInstance_changePromise
(
self
):
new_id
=
self
.
generateNewId
()
instance
=
self
.
portal
.
software_instance_module
.
newContent
(
portal_type
=
'Software Instance'
,
title
=
"Instance %s"
%
new_id
,
reference
=
"TESTINST-%s"
%
new_id
,
destination_reference
=
"TESTINST-%s"
%
new_id
,
ssl_certificate
=
"foo"
,
ssl_key
=
"bar"
,
)
instance
.
validate
()
self
.
assertEqual
(
instance
.
getCausalityState
(),
'diverged'
)
request_kw
=
dict
(
software_release
=
'http://example.org'
,
software_type
=
'http://example.org'
,
instance_xml
=
self
.
generateSafeXml
(),
sla_xml
=
self
.
generateSafeXml
(),
shared
=
False
,
)
instance
.
converge
()
self
.
assertEqual
(
instance
.
getCausalityState
(),
'solved'
)
instance
.
requestStop
(
**
request_kw
)
self
.
assertEqual
(
instance
.
getCausalityState
(),
'diverged'
)
instance
.
converge
()
self
.
assertEqual
(
instance
.
getCausalityState
(),
'solved'
)
instance
.
requestStart
(
**
request_kw
)
self
.
assertEqual
(
instance
.
getCausalityState
(),
'diverged'
)
instance
.
converge
()
self
.
assertEqual
(
instance
.
getCausalityState
(),
'solved'
)
instance
.
bang
(
comment
=
'Test bang interaction'
,
bang_tree
=
False
)
self
.
assertEqual
(
instance
.
getCausalityState
(),
'diverged'
)
instance
.
converge
()
self
.
assertEqual
(
instance
.
getCausalityState
(),
'solved'
)
instance
.
requestDestroy
(
**
request_kw
)
self
.
assertEqual
(
instance
.
getCausalityState
(),
'diverged'
)
def
test_SoftwareInstance_changePromiseInDivergedState
(
self
):
new_id
=
self
.
generateNewId
()
instance
=
self
.
portal
.
software_instance_module
.
newContent
(
portal_type
=
'Software Instance'
,
title
=
"Instance %s"
%
new_id
,
reference
=
"TESTINST-%s"
%
new_id
,
destination_reference
=
"TESTINST-%s"
%
new_id
,
ssl_certificate
=
"foo"
,
ssl_key
=
"bar"
,
)
instance
.
validate
()
self
.
assertEqual
(
instance
.
getCausalityState
(),
'diverged'
)
request_kw
=
dict
(
software_release
=
'http://example.org'
,
software_type
=
'http://example.org'
,
instance_xml
=
self
.
generateSafeXml
(),
sla_xml
=
self
.
generateSafeXml
(),
shared
=
False
,
)
instance
.
requestStop
(
**
request_kw
)
self
.
assertEqual
(
instance
.
getCausalityState
(),
'diverged'
)
def
_simulateHostingSubscription_calculateSubscriptionStartDate
(
self
,
date
):
script_name
=
'HostingSubscription_calculateSubscriptionStartDate'
if
script_name
in
self
.
portal
.
portal_skins
.
custom
.
objectIds
():
...
...
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