#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:
@@ -12,12 +12,18 @@ def test_passing_actions_down(monkeypatch) -> None:
|
||||
|
||||
sim = Simulation()
|
||||
|
||||
pc1 = Computer.from_config(config={"type":"computer", "hostname":"PC-1", "ip_address":"10.10.1.1", "subnet_mask":"255.255.255.0"})
|
||||
pc1 = Computer.from_config(
|
||||
config={"type": "computer", "hostname": "PC-1", "ip_address": "10.10.1.1", "subnet_mask": "255.255.255.0"}
|
||||
)
|
||||
pc1.start_up_duration = 0
|
||||
pc1.power_on()
|
||||
pc2 = Computer.from_config(config={"type":"computer", "hostname":"PC-2", "ip_address":"10.10.1.2", "subnet_mask":"255.255.255.0"})
|
||||
srv = Server.from_config(config={"type":"server", "hostname":"WEBSERVER", "ip_address":"10.10.1.100", "subnet_mask":"255.255.255.0"})
|
||||
s1 = Switch.from_config(config={"type":"switch", "hostname":"switch1"})
|
||||
pc2 = Computer.from_config(
|
||||
config={"type": "computer", "hostname": "PC-2", "ip_address": "10.10.1.2", "subnet_mask": "255.255.255.0"}
|
||||
)
|
||||
srv = Server.from_config(
|
||||
config={"type": "server", "hostname": "WEBSERVER", "ip_address": "10.10.1.100", "subnet_mask": "255.255.255.0"}
|
||||
)
|
||||
s1 = Switch.from_config(config={"type": "switch", "hostname": "switch1"})
|
||||
|
||||
for n in [pc1, pc2, srv, s1]:
|
||||
sim.network.add_node(n)
|
||||
|
||||
Reference in New Issue
Block a user