#2350: apply PR suggestions
This commit is contained in:
@@ -43,14 +43,14 @@ def test_nic(simulation):
|
||||
nic_obs = NicObservation(where=["network", "nodes", pc.hostname, "NICs", 1])
|
||||
|
||||
assert nic_obs.space["nic_status"] == spaces.Discrete(3)
|
||||
assert nic_obs.space["nmne"]["inbound"] == spaces.Discrete(4)
|
||||
assert nic_obs.space["nmne"]["outbound"] == spaces.Discrete(4)
|
||||
assert nic_obs.space["NMNE"]["inbound"] == spaces.Discrete(4)
|
||||
assert nic_obs.space["NMNE"]["outbound"] == spaces.Discrete(4)
|
||||
|
||||
observation_state = nic_obs.observe(simulation.describe_state())
|
||||
assert observation_state.get("nic_status") == 1 # enabled
|
||||
assert observation_state.get("nmne") is not None
|
||||
assert observation_state["nmne"].get("inbound") == 0
|
||||
assert observation_state["nmne"].get("outbound") == 0
|
||||
assert observation_state.get("NMNE") is not None
|
||||
assert observation_state["NMNE"].get("inbound") == 0
|
||||
assert observation_state["NMNE"].get("outbound") == 0
|
||||
|
||||
nic.disable()
|
||||
observation_state = nic_obs.observe(simulation.describe_state())
|
||||
|
||||
@@ -32,7 +32,7 @@ def test_node_observation(simulation):
|
||||
|
||||
assert observation_state.get("SERVICES") is not None
|
||||
assert observation_state.get("FOLDERS") is not None
|
||||
assert observation_state.get("NETWORK_INTERFACES") is not None
|
||||
assert observation_state.get("NICS") is not None
|
||||
|
||||
# turn off computer
|
||||
pc.power_off()
|
||||
|
||||
@@ -179,8 +179,8 @@ def test_capture_nmne_observations(uc2_network):
|
||||
|
||||
# Observe the current state of NMNEs from the NICs of both the database and web servers
|
||||
state = sim.describe_state()
|
||||
db_nic_obs = db_server_nic_obs.observe(state)["nmne"]
|
||||
web_nic_obs = web_server_nic_obs.observe(state)["nmne"]
|
||||
db_nic_obs = db_server_nic_obs.observe(state)["NMNE"]
|
||||
web_nic_obs = web_server_nic_obs.observe(state)["NMNE"]
|
||||
|
||||
# Define expected NMNE values based on the iteration count
|
||||
if i > 10:
|
||||
|
||||
Reference in New Issue
Block a user