Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
clair-singularity
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
BioHPC
clair-singularity
Commits
9733f723
Commit
9733f723
authored
7 years ago
by
David Trudgian
Browse files
Options
Downloads
Patches
Plain Diff
daemonize httpd process
parent
6fec904d
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
clair_singularity/cli.py
+1
-0
1 addition, 0 deletions
clair_singularity/cli.py
tests/test_image.py
+1
-0
1 addition, 0 deletions
tests/test_image.py
with
2 additions
and
0 deletions
clair_singularity/cli.py
+
1
−
0
View file @
9733f723
...
...
@@ -41,6 +41,7 @@ def cli(image, clair_uri, text_output, json_output, bind_ip, bind_port, quiet):
# Start an HTTP server to serve the .tar.gz from our temporary directory
# so that Clair can retrieve it
httpd
=
Process
(
target
=
http_server
,
args
=
(
tar_dir
,
bind_ip
,
bind_port
,
quiet
))
httpd
.
daemon
=
True
httpd
.
start
()
# Allow up to 30 seconds for the httpd to start and be answering requests
httpd_ready
=
wait_net_service
(
bind_ip
,
bind_port
,
30
)
...
...
This diff is collapsed.
Click to expand it.
tests/test_image.py
+
1
−
0
View file @
9733f723
...
...
@@ -46,6 +46,7 @@ def test_http_server(testimage, tmpdir):
"""
Test we can retrieve the test image from in-built http server
"""
httpd
=
multiprocessing
.
Process
(
target
=
http_server
,
args
=
(
os
.
path
.
dirname
(
testimage
),
'
127.0.0.1
'
,
8088
,
False
))
httpd
.
daemon
=
True
httpd
.
start
()
# Allow up to 30 seconds for the httpd to start and be answering requests
httpd_ready
=
wait_net_service
(
'
127.0.0.1
'
,
8088
,
30
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment