Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
caucase
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
Ivan Tyagov
caucase
Commits
c5634e69
Commit
c5634e69
authored
Nov 04, 2017
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cli.updater: Make testable.
parent
1fec835c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
caucase/cli.py
caucase/cli.py
+3
-3
No files found.
caucase/cli.py
View file @
c5634e69
...
...
@@ -589,7 +589,7 @@ def probe(argv=None):
if
https_ca_pem
not
in
(
http_ca_pem
,
http2_ca_pem
):
raise
ValueError
(
'http and https do not serve the same caucase database'
)
def
updater
(
argv
=
None
):
def
updater
(
argv
=
None
,
until
=
utils
.
until
):
"""
Bootstrap certificate and companion files and keep them up-to-date.
"""
...
...
@@ -719,7 +719,7 @@ def updater(argv=None):
# through.
client
.
getCertificateSigningRequest
(
csr_id
)
# Still here ? Ok, wait a bit and try again.
u
tils
.
interruptibleSleep
(
60
)
u
ntil
(
datetime
.
datetime
.
utcnow
()
+
datetime
.
timedelta
(
0
,
60
)
)
else
:
with
open
(
args
.
crt
,
'a'
)
as
crt_file
:
crt_file
.
write
(
crt_pem
)
...
...
@@ -731,7 +731,7 @@ def updater(argv=None):
print
'Next wake-up at'
,
next_deadline
.
strftime
(
'%Y-%m-%d %H:%M:%S +0000'
)
now
=
u
tils
.
u
ntil
(
next_deadline
)
now
=
until
(
next_deadline
)
if
args
.
cas_ca
!=
args
.
ca
and
updateCAFile
(
cas_url
,
args
.
cas_ca
):
client
=
CaucaseClient
(
ca_url
=
ca_url
,
...
...
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