diff --git a/Dockerfile b/Dockerfile index e487f63..5b63403 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,8 @@ RUN pip install --prefix=/install -r /requirement.txt FROM base COPY --from=builder /install /usr/local RUN mkdir -p /app/agent +ENV PYTHONPATH=/app COPY agent /app/agent COPY ostorlab.yaml /app/agent/ostorlab.yaml WORKDIR /app -CMD ["python3", "/app/agent/agent.py"] +CMD ["python3", "/app/agent/virus_total_agent.py"] diff --git a/agent/agent.py b/agent/virus_total_agent.py similarity index 100% rename from agent/agent.py rename to agent/virus_total_agent.py diff --git a/ostorlab.yaml b/ostorlab.yaml index e54ea02..7b9ae6b 100644 --- a/ostorlab.yaml +++ b/ostorlab.yaml @@ -1,5 +1,5 @@ kind: Agent -name: virustotal_agent +name: virustotal version: 0.0.1 description: Agent responsible for scanning files through the Virus Total public API. in_selectors: diff --git a/tests/conftest.py b/tests/conftest.py index 13a2053..95529d5 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -6,7 +6,7 @@ from ostorlab.agent import definitions as agent_definitions from ostorlab.runtimes import definitions as runtime_definitions -from agent import agent as virustotal_agent +from agent import virus_total_agent @pytest.fixture(name='message') @@ -42,7 +42,7 @@ def create_virustotal_agent(): bus_exchange_topic='NA', ) - agent = virustotal_agent.VirusTotalAgent( + agent = virus_total_agent.VirusTotalAgent( definition, settings, ) diff --git a/tests/test_agent.py b/tests/test_agent.py index 174d535..376da44 100644 --- a/tests/test_agent.py +++ b/tests/test_agent.py @@ -15,8 +15,9 @@ def testVirusTotalAgent_when_virusTotalApiReturnsValidResponse_noRaiseVirusTotal and finally emits a message of type v3.report.vulnerability with the details above. """ - def virustotal_valid_response(message): # pylint: disable=W0613 + def virustotal_valid_response(message): """Method for mocking the Virus Total public API valid response.""" + del message response = { 'results': { 'scans': {