Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
beat.core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
beat
beat.core
Commits
9f27d73f
Commit
9f27d73f
authored
6 years ago
by
Samuel GAIST
Browse files
Options
Downloads
Patches
Plain Diff
[test][docker_databases_provider] Code cleanup
parent
24693b5b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!62
Code cleanup
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
beat/core/test/test_docker_databases_provider.py
+4
-13
4 additions, 13 deletions
beat/core/test/test_docker_databases_provider.py
with
4 additions
and
13 deletions
beat/core/test/test_docker_databases_provider.py
+
4
−
13
View file @
9f27d73f
...
...
@@ -38,31 +38,22 @@
import
os
import
sys
import
logging
logger
=
logging
.
getLogger
(
__name__
)
import
unittest
import
simplejson
import
multiprocessing
import
tempfile
import
shutil
import
zmq
from
time
import
time
from
time
import
sleep
from
beat.backend.python.scripts
import
databases_provider
from
beat.backend.python.database
import
Database
from
beat.backend.python.data
import
RemoteDataSource
from
beat.backend.python.data
import
RemoteException
from
..dock
import
Host
from
..utils
import
find_free_port
from
.
import
prefix
from
.
import
tmp_prefix
logger
=
logging
.
getLogger
(
__name__
)
# ----------------------------------------------------------
...
...
@@ -107,8 +98,8 @@ class TestDatabasesProvider(unittest.TestCase):
def
setUp
(
self
):
if
sys
.
platform
==
"
darwin
"
:
self
.
working_dir
=
tempfile
.
mkdtemp
(
prefix
=
__name__
,
dir
=
"
/tmp
"
)
self
.
cache_root
=
tempfile
.
mkdtemp
(
prefix
=
__name__
,
dir
=
"
/tmp
"
)
self
.
working_dir
=
tempfile
.
mkdtemp
(
prefix
=
__name__
,
dir
=
"
/tmp
"
)
# nosec
self
.
cache_root
=
tempfile
.
mkdtemp
(
prefix
=
__name__
,
dir
=
"
/tmp
"
)
# nosec
else
:
self
.
working_dir
=
tempfile
.
mkdtemp
(
prefix
=
__name__
)
self
.
cache_root
=
tempfile
.
mkdtemp
(
prefix
=
__name__
)
...
...
@@ -169,7 +160,7 @@ class TestDatabasesProvider(unittest.TestCase):
self
.
databases_container
.
add_volume
(
self
.
working_dir
,
"
/beat/prefix
"
)
self
.
databases_container
.
add_volume
(
"
/tmp
"
,
os
.
path
.
join
(
"
/beat/datasets
"
,
input_cfg
[
"
database
"
])
"
/tmp
"
,
os
.
path
.
join
(
"
/beat/datasets
"
,
input_cfg
[
"
database
"
])
# nosec
)
self
.
databases_container
.
add_volume
(
self
.
cache_root
,
"
/beat/cache
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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