#2887 - Merge in changes on dev to resolve conflicts. All tests should now pass
This commit is contained in:
@@ -232,7 +232,7 @@ def example_network() -> Network:
|
||||
|
||||
# Router 1
|
||||
|
||||
router_1_cfg = {"hostname": "router_1", "type": "router", "start_up_duration":0}
|
||||
router_1_cfg = {"hostname": "router_1", "type": "router", "start_up_duration": 0}
|
||||
|
||||
# router_1 = Router(hostname="router_1", start_up_duration=0)
|
||||
router_1 = Router.from_config(config=router_1_cfg)
|
||||
@@ -253,7 +253,7 @@ def example_network() -> Network:
|
||||
router_1.enable_port(1)
|
||||
|
||||
# Switch 2
|
||||
switch_2_config = {"hostname": "switch_2", "type": "switch", "num_ports": 8, "start_up_duration":0}
|
||||
switch_2_config = {"hostname": "switch_2", "type": "switch", "num_ports": 8, "start_up_duration": 0}
|
||||
# switch_2 = Switch(hostname="switch_2", num_ports=8, start_up_duration=0)
|
||||
switch_2 = Switch.from_config(config=switch_2_config)
|
||||
switch_2.power_on()
|
||||
@@ -387,7 +387,7 @@ def install_stuff_to_sim(sim: Simulation):
|
||||
"ip_address": "10.0.1.2",
|
||||
"subnet_mask": "255.255.255.0",
|
||||
"default_gateway": "10.0.1.1",
|
||||
"start_up_duration":0,
|
||||
"start_up_duration": 0,
|
||||
}
|
||||
client_1: Computer = Computer.from_config(config=client_1_cfg)
|
||||
client_1.power_on()
|
||||
|
||||
@@ -3,8 +3,8 @@ from primaite.config.load import data_manipulation_config_path
|
||||
from primaite.simulator.network.container import Network
|
||||
from primaite.simulator.network.hardware.node_operating_state import NodeOperatingState
|
||||
from primaite.simulator.network.hardware.nodes.host.computer import Computer
|
||||
from primaite.simulator.network.hardware.nodes.network.wireless_router import WirelessRouter
|
||||
from primaite.simulator.network.hardware.nodes.network.firewall import Firewall
|
||||
from primaite.simulator.network.hardware.nodes.network.wireless_router import WirelessRouter
|
||||
from tests.integration_tests.configuration_file_parsing import BASIC_CONFIG, DMZ_NETWORK, load_config
|
||||
|
||||
|
||||
|
||||
@@ -8,10 +8,9 @@ from primaite.simulator.sim_container import Simulation
|
||||
|
||||
def test_file_observation():
|
||||
sim = Simulation()
|
||||
pc: Computer = Computer.from_config(config={"type":"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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user