#2887 - Node class changes to address some test failures. Addressed some inconsistencies around operating_state, amended instantiation of some Nodes in test environments
This commit is contained in:
@@ -8,14 +8,17 @@ from primaite.simulator.sim_container import Simulation
|
||||
|
||||
def test_file_observation():
|
||||
sim = Simulation()
|
||||
pc = Computer(hostname="beep", ip_address="123.123.123.123", subnet_mask="255.255.255.0")
|
||||
pc: Computer = Computer.from_config(config={"type":"computer",
|
||||
"hostname":"beep",
|
||||
"ip_address":"123.123.123.123",
|
||||
"subnet_mask":"255.255.255.0"})
|
||||
sim.network.add_node(pc)
|
||||
f = pc.file_system.create_file(file_name="dog.png")
|
||||
|
||||
state = sim.describe_state()
|
||||
|
||||
dog_file_obs = FileObservation(
|
||||
where=["network", "nodes", pc.hostname, "file_system", "folders", "root", "files", "dog.png"],
|
||||
where=["network", "nodes", pc.config.hostname, "file_system", "folders", "root", "files", "dog.png"],
|
||||
include_num_access=False,
|
||||
file_system_requires_scan=False,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user