Island: Remove `log_contents` from Agent model

This commit is contained in:
Ilija Lazoroski 2022-09-27 16:57:14 +02:00 committed by Mike Salvatore
parent ea94da9725
commit d7be8e2bc0
2 changed files with 0 additions and 13 deletions

View File

@ -29,6 +29,3 @@ class Agent(MutableInfectionMonkeyBaseModel):
cc_server: Optional[SocketAddress]
"""The address that the agent used to communicate with the island"""
log_contents: str = Field(default="")
"""The contents of the agent's log (empty until the agent shuts down)"""

View File

@ -38,7 +38,6 @@ def test_constructor__defaults_from_simple_dict():
assert a.parent_id is None
assert a.stop_time is None
assert a.cc_server is None
assert a.log_contents == ""
def test_to_dict():
@ -46,7 +45,6 @@ def test_to_dict():
agent_simple_dict = AGENT_SIMPLE_DICT.copy()
agent_simple_dict["stop_time"] = None
agent_simple_dict["cc_server"] = None
agent_simple_dict["log_contents"] = ""
assert a.dict(simplify=True) == agent_simple_dict
@ -60,7 +58,6 @@ def test_to_dict():
("stop_time", []),
("parent_id", 2.1),
("cc_server", [1]),
("log_contents", None),
],
)
def test_construct_invalid_field__type_error(key, value):
@ -128,10 +125,3 @@ def test_cc_server_set_validated():
with pytest.raises(ValueError):
a.cc_server = []
def test_log_contents_set_validated():
a = Agent(**AGENT_SIMPLE_DICT)
with pytest.raises(ValueError):
a.log_contents = None