diff --git a/.github/workflows/CI-production-testing-integration-tests.yml b/.github/workflows/CI-production-testing-integration-tests.yml index f0170e8a3..11ef3a213 100644 --- a/.github/workflows/CI-production-testing-integration-tests.yml +++ b/.github/workflows/CI-production-testing-integration-tests.yml @@ -53,9 +53,6 @@ jobs: run: redis-server --daemonize yes - - name: Test Test - run: python -c 'import os;os.system("ls")' - - name: Test 2 run: python3 slips.py -t -e 1 -f dataset/test7-malicious.pcap -o output/integration_tests/test_configuration_file -c tests/integration_tests/test.yaml -P 6667 diff --git a/slips_files/core/database/redis_db/database.py b/slips_files/core/database/redis_db/database.py index d6b395f6d..1b538a063 100644 --- a/slips_files/core/database/redis_db/database.py +++ b/slips_files/core/database/redis_db/database.py @@ -292,10 +292,14 @@ def _start_a_redis_server(cls) -> bool: stdout=subprocess.PIPE, stderr=subprocess.PIPE, ) - stderr = process.communicate()[1] + stdout, stderr = process.communicate() stderr = stderr.decode("utf-8") - if stderr: - raise RuntimeError(stderr) + stdout = stdout.decode("utf-8") + + if stderr or "warning" in stdout.lower(): + raise RuntimeError( + f"database._start_a_redis_server: {stderr}\n" f"{stdout}" + ) return True @classmethod @@ -305,7 +309,6 @@ def connect_to_redis_server(cls) -> Tuple[bool, str]: Returns a tuple of (bool, error message). """ try: - # db 0 changes everytime we run slips cls.r = cls._connect(cls.redis_port, 0) # port 6379 db 0 is cache, delete it using -cc flag @@ -320,7 +323,7 @@ def connect_to_redis_server(cls) -> Tuple[bool, str]: cls.r.client_list() return True, "" except Exception as e: - return False, str(e) + return False, f"database.connect_to_redis_server: {e}" @classmethod def close_redis_server(cls, redis_port):