Commit 9f27d73f authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[test][docker_databases_provider] Code cleanup

parent 24693b5b
......@@ -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 import RemoteDataSource
from 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
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")
"/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")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment