Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
Xavier Thompson
slapos
Commits
cbfb3803
Commit
cbfb3803
authored
Jun 02, 2022
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/theia: Improve ERP5 resiliency test
parent
0252a737
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
software/theia/test/project_tests.py
software/theia/test/project_tests.py
+10
-0
No files found.
software/theia/test/project_tests.py
View file @
cbfb3803
...
@@ -211,6 +211,7 @@ class TestTheiaResilienceERP5(ERP5Mixin, test_resiliency.TestTheiaResilience):
...
@@ -211,6 +211,7 @@ class TestTheiaResilienceERP5(ERP5Mixin, test_resiliency.TestTheiaResilience):
try
:
try
:
out
=
subprocess
.
check_output
((
mysql_bin
,
'erp5'
,
'-e'
,
query
),
universal_newlines
=
True
)
out
=
subprocess
.
check_output
((
mysql_bin
,
'erp5'
,
'-e'
,
query
),
universal_newlines
=
True
)
except
subprocess
.
CalledProcessError
:
except
subprocess
.
CalledProcessError
:
print
(
"DEBUG: query into erp5.catalog failed before restoration"
)
out
=
''
out
=
''
self
.
assertNotIn
(
self
.
_erp5_new_title
,
out
)
self
.
assertNotIn
(
self
.
_erp5_new_title
,
out
)
...
@@ -223,6 +224,15 @@ class TestTheiaResilienceERP5(ERP5Mixin, test_resiliency.TestTheiaResilience):
...
@@ -223,6 +224,15 @@ class TestTheiaResilienceERP5(ERP5Mixin, test_resiliency.TestTheiaResilience):
print
(
"Restore mariadb from backup"
)
print
(
"Restore mariadb from backup"
)
subprocess
.
check_call
(
mariadb_restore_script
)
subprocess
.
check_call
(
mariadb_restore_script
)
# Check that the mariadb catalog was properly restored for debugging purposes
try
:
out
=
subprocess
.
check_output
((
mysql_bin
,
'erp5'
,
'-e'
,
query
),
universal_newlines
=
True
)
self
.
assertIn
(
self
.
_erp5_new_title
,
out
,
'Mariadb catalog is not properly restored'
)
except
subprocess
.
CalledProcessError
:
print
(
"DEBUG: query into erp5.catalog failed after restoration"
)
except
AssertionError
:
print
(
"DEBUG: erp5.catalog doesn't contain expected changes after restoration"
)
# Check that the test instance is properly redeployed after restoring mariadb
# Check that the test instance is properly redeployed after restoring mariadb
# This restarts the services and checks the promises of the test instance
# This restarts the services and checks the promises of the test instance
# Process twice to propagate state change
# Process twice to propagate state change
...
...
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