Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
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
Arnaud Véron
slapos.package
Commits
3b15fd91
Commit
3b15fd91
authored
Jul 15, 2014
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos.package.test: Fix test messages
parent
285e04f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
slapos/package/test/test_promise_core.py
slapos/package/test/test_promise_core.py
+15
-5
No files found.
slapos/package/test/test_promise_core.py
View file @
3b15fd91
...
...
@@ -230,7 +230,8 @@ reboot = 2100-11-11
def
_fake_signature_download
(
self
,
path
,
*
args
,
**
kwargs
):
with
open
(
path
,
'w'
)
as
upgrade_signature
:
modified_upgrade_key
=
UPGRADE_KEY_WITHOUT_KEY_LIST
.
replace
(
"upgrade = 2014-06-04"
,
"upgrade = 2100-01-01"
)
"upgrade = 2014-06-04"
,
"upgrade = %s"
%
datetime
.
datetime
.
today
().
strftime
(
"%Y-%m-%d"
))
upgrade_signature
.
write
(
modified_upgrade_key
)
return
True
...
...
@@ -242,7 +243,7 @@ reboot = 2100-11-11
slapupdate_path
=
"/tmp/testFixConsistencyUpgrade"
with
open
(
slapupdate_path
,
'w'
)
as
slapupdate
:
slapupdate
.
write
(
"""[system]
upgrade =
2000
-11-11
upgrade =
1999
-11-11
reboot = 2100-11-11
"""
)
...
...
@@ -254,10 +255,19 @@ reboot = 2100-11-11
expected_message_list
=
[
'Expected Reboot early them 2011-10-10'
,
'Expected Upgrade early them 2100-01-01'
,
'Expected Upgrade early them %s'
%
\
datetime
.
datetime
.
today
().
strftime
(
"%Y-%m-%d"
),
'Last reboot : 2100-11-11'
,
'Last upgrade : 2000-11-11'
,
'Upgrade will happens on 2100-01-01'
]
'Last upgrade : 1999-11-11'
,
'Upgrade is required.'
,
'Retrying after fixConsistency....
\
n
\
n
'
,
'Expected Reboot early them 2011-10-10'
,
'Expected Upgrade early them 2014-07-15'
,
'Last reboot : 2100-11-11'
,
'Last upgrade : 2014-07-15'
,
'Your system is up to date'
,
'No need to reboot.'
,
'No need to reboot.'
]
self
.
assertEquals
(
promise
.
_message_list
,
expected_message_list
)
...
...
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