901 - fixed test_single_action_space.py test
This commit is contained in:
@@ -42,7 +42,7 @@ apply_implicit_rule: True
|
||||
# Implicit ACL firewall rule at end of lists to be default action or no rule can be selected (ALLOW or DENY)
|
||||
implicit_acl_rule: DENY
|
||||
# Total number of ACL rules allowed in the environment
|
||||
max_number_acl_rules: 3
|
||||
max_number_acl_rules: 10
|
||||
|
||||
observation_space:
|
||||
components:
|
||||
|
||||
@@ -58,7 +58,6 @@ class TempPrimaiteSession(PrimaiteSession):
|
||||
|
||||
def __exit__(self, type, value, tb):
|
||||
shutil.rmtree(self.session_path)
|
||||
# shutil.rmtree(self.session_path.parent)
|
||||
_LOGGER.debug(f"Deleted temp session directory: {self.session_path}")
|
||||
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ import time
|
||||
|
||||
import pytest
|
||||
|
||||
from primaite.acl.acl_rule import ACLRule
|
||||
from primaite.common.enums import HardwareState
|
||||
from primaite.environment.primaite_env import Primaite
|
||||
from tests import TEST_CONFIG_ROOT
|
||||
@@ -112,7 +113,7 @@ def test_agent_is_executing_actions_from_both_spaces(temp_primaite_session):
|
||||
# This 1 rule added to the implicit deny means there should be 2 rules in total.
|
||||
rules_count = 0
|
||||
for rule in acl_rules_list:
|
||||
if rule != -1:
|
||||
if isinstance(rule, ACLRule):
|
||||
rules_count += 1
|
||||
# Therefore these statements below MUST be true
|
||||
assert computer_node_hardware_state == HardwareState.OFF
|
||||
|
||||
Reference in New Issue
Block a user