forked from p34709852/monkey
Merge pull request #1969 from guardicore/1967-fix-travis
Project: Fix travis build
This commit is contained in:
commit
b3710e4772
|
@ -52,4 +52,3 @@ repos:
|
|||
rev: v2.3
|
||||
hooks:
|
||||
- id: vulture
|
||||
exclude: "monkey/monkey_island/docs/source/conf.py"
|
||||
|
|
|
@ -57,7 +57,6 @@ jobs:
|
|||
# check python code
|
||||
## check syntax errors and fail the build if any are found.
|
||||
- flake8 .
|
||||
|
||||
## check import order
|
||||
- python -m isort ./monkey --check-only
|
||||
|
||||
|
|
|
@ -8,10 +8,10 @@ from typing import Mapping, Sequence
|
|||
# might require more complex casting logic
|
||||
@dataclass
|
||||
class NetworkMap:
|
||||
nodes: Mapping[str, Sequence[Arc]]
|
||||
nodes: Mapping[str, Sequence[Arc]] # noqa: F821
|
||||
|
||||
|
||||
@dataclass
|
||||
class Arc:
|
||||
dst_machine: Machine
|
||||
dst_machine: Machine # noqa: F821
|
||||
status: str
|
||||
|
|
|
@ -4,10 +4,10 @@ from typing import Optional, Sequence
|
|||
|
||||
class ILogRepository(ABC):
|
||||
# Define log object
|
||||
def get_logs(self, agent_id: Optional[str] = None) -> Sequence[Log]:
|
||||
def get_logs(self, agent_id: Optional[str] = None) -> Sequence[Log]: # noqa: F821
|
||||
pass
|
||||
|
||||
def save_log(self, log: Log):
|
||||
def save_log(self, log: Log): # noqa: F821
|
||||
pass
|
||||
|
||||
def delete_log(self, agent_id: str):
|
||||
|
|
|
@ -4,7 +4,7 @@ from typing import Optional, Sequence
|
|||
|
||||
class IMachineRepository(ABC):
|
||||
# TODO define Machine object(ORM model)
|
||||
def save_machine(self, machine: Machine):
|
||||
def save_machine(self, machine: Machine): # noqa: F821
|
||||
pass
|
||||
|
||||
# TODO define Machine object(ORM model)
|
||||
|
@ -14,7 +14,7 @@ class IMachineRepository(ABC):
|
|||
self,
|
||||
id: Optional[str] = None,
|
||||
ips: Optional[Sequence[str]] = None,
|
||||
state: Optional[MachineState] = None,
|
||||
state: Optional[MachineState] = None, # noqa: F821
|
||||
is_island: Optional[bool] = None,
|
||||
) -> Sequence[Machine]:
|
||||
) -> Sequence[Machine]: # noqa: F821
|
||||
pass
|
||||
|
|
|
@ -4,8 +4,8 @@ from abc import ABC
|
|||
class INetworkMapRepository(ABC):
|
||||
|
||||
# TODO Define NetMap object
|
||||
def get_map(self) -> NetMap:
|
||||
def get_map(self) -> NetMap: # noqa: F821
|
||||
pass
|
||||
|
||||
def save_netmap(self, netmap: NetMap):
|
||||
def save_netmap(self, netmap: NetMap): # noqa: F821
|
||||
pass
|
||||
|
|
|
@ -4,7 +4,7 @@ from abc import ABC
|
|||
class ISimulationRepository(ABC):
|
||||
# TODO define simulation object. It should contain metadata about simulation,
|
||||
# like start, end times, mode and last forced stop of all monkeys
|
||||
def save_simulation(self, simulation: Simulation):
|
||||
def save_simulation(self, simulation: Simulation): # noqa: F821
|
||||
pass
|
||||
|
||||
def get_simulation(self):
|
||||
|
|
|
@ -14,7 +14,7 @@ class ITelemetryRepository(ABC):
|
|||
def get_telemetries(
|
||||
self,
|
||||
id: Optional[str] = None,
|
||||
type: Optional[TelemetryType] = None,
|
||||
type: Optional[TelemetryType] = None, # noqa: F821
|
||||
monkey_id: Optional[str] = None,
|
||||
) -> Sequence[Telemetry]:
|
||||
pass
|
||||
|
|
|
@ -15,6 +15,7 @@ MAX_SAME_CATEGORY_TELEMS = 10000
|
|||
logging.basicConfig(level=logging.INFO)
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
# TODO this will break with the IRepository implementation. Remove it
|
||||
class TestTelemStore:
|
||||
TELEMS_EXPORTED = False
|
||||
|
|
|
@ -25,5 +25,5 @@ norecursedirs = "node_modules dist"
|
|||
markers = ["slow: mark test as slow"]
|
||||
|
||||
[tool.vulture]
|
||||
exclude = ["monkey/monkey_island/cc/ui/", "monkey/tests/"]
|
||||
exclude = ["monkey/monkey_island/cc/ui/", "monkey/tests/", "monkey/monkey_island/docs/"]
|
||||
paths = ["."]
|
||||
|
|
Loading…
Reference in New Issue