Skip to content

Commit

Permalink
Merge pull request #11 from methodsanalytics/feature/AIDT-67-define-c…
Browse files Browse the repository at this point in the history
…onfig-class-structure

AIDT-67 define config class structure
  • Loading branch information
czar-ec-envitia authored Nov 8, 2022
2 parents 1de550c + 0155712 commit bf19ddc
Show file tree
Hide file tree
Showing 46 changed files with 2,262 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
TEST_CONFIG_PATH: Final[Path] = Path(
os.path.join(Path(__file__).parent.resolve(), "test_configs")
)

TEST_BASE_CONFIG_PATH = Path(
os.path.join(Path(__file__).parent.resolve(), "test_configs", "base_config.yaml")
)
12 changes: 12 additions & 0 deletions tests/config_test_utils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from pathlib import Path

import yaml
from yaml.loader import SafeLoader


def read_yaml_file(yaml_location: Path):
try:
with open(yaml_location) as f:
return yaml.load(f, Loader=SafeLoader)
except FileNotFoundError as e:
raise e
2 changes: 2 additions & 0 deletions tests/test_configs/base_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ BLUE:
relocating_deceptive_nodes_generates_a_new_node: True

GAME_RULES:
# Minimum number of nodes the network this game mode is allowed to run on
min_number_of_network_nodes: 18
# A lower vulnerability means that a node is less likely to be compromised
node_vulnerability_lower_bound: 0.2
# A higher vulnerability means that a node is more vulnerable
Expand Down
2 changes: 2 additions & 0 deletions tests/test_configs/everything_guaranteed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ BLUE:
relocating_deceptive_nodes_generates_a_new_node: True

GAME_RULES:
# Minimum number of nodes the network this game mode is allowed to run on
min_number_of_network_nodes: 18
# A lower vulnerability means that a node is less likely to be compromised
node_vulnerability_lower_bound: 0.2
# A higher vulnerability means that a node is more vulnerable
Expand Down
2 changes: 2 additions & 0 deletions tests/test_configs/high_value_target_provided.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ BLUE:
relocating_deceptive_nodes_generates_a_new_node: True

GAME_RULES:
# Minimum number of nodes the network this game mode is allowed to run on
min_number_of_network_nodes: 18
# A lower vulnerability means that a node is less likely to be compromised
node_vulnerability_lower_bound: 0.2
# A higher vulnerability means that a node is more vulnerable
Expand Down
2 changes: 2 additions & 0 deletions tests/test_configs/new_entry_nodes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ BLUE:
relocating_deceptive_nodes_generates_a_new_node: True

GAME_RULES:
# Minimum number of nodes the network this game mode is allowed to run on
min_number_of_network_nodes: 18
# A lower vulnerability means that a node is less likely to be compromised
node_vulnerability_lower_bound: 0.2
# A higher vulnerability means that a node is more vulnerable
Expand Down
2 changes: 2 additions & 0 deletions tests/test_configs/new_high_value_target.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ BLUE:
relocating_deceptive_nodes_generates_a_new_node: True

GAME_RULES:
# Minimum number of nodes the network this game mode is allowed to run on
min_number_of_network_nodes: 18
# A lower vulnerability means that a node is less likely to be compromised
node_vulnerability_lower_bound: 0.2
# A higher vulnerability means that a node is more vulnerable
Expand Down
2 changes: 2 additions & 0 deletions tests/test_configs/red_config_test_1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ BLUE:
relocating_deceptive_nodes_generates_a_new_node: True

GAME_RULES:
# Minimum number of nodes the network this game mode is allowed to run on
min_number_of_network_nodes: 18
# A lower vulnerability means that a node is less likely to be compromised
node_vulnerability_lower_bound: 0.2
# A higher vulnerability means that a node is more vulnerable
Expand Down
2 changes: 2 additions & 0 deletions tests/test_configs/red_config_test_2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ BLUE:
relocating_deceptive_nodes_generates_a_new_node: False

GAME_RULES:
# Minimum number of nodes the network this game mode is allowed to run on
min_number_of_network_nodes: 18
# A lower vulnerability means that a node is less likely to be compromised
node_vulnerability_lower_bound: 0.2
# A higher vulnerability means that a node is more vulnerable
Expand Down
2 changes: 2 additions & 0 deletions tests/test_configs/red_config_test_3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ BLUE:
relocating_deceptive_nodes_generates_a_new_node: True

GAME_RULES:
# Minimum number of nodes the network this game mode is allowed to run on
min_number_of_network_nodes: 18
# A lower vulnerability means that a node is less likely to be compromised
node_vulnerability_lower_bound: 0.2
# A higher vulnerability means that a node is more vulnerable
Expand Down
2 changes: 2 additions & 0 deletions tests/test_configs/red_config_test_4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ BLUE:
relocating_deceptive_nodes_generates_a_new_node: True

GAME_RULES:
# Minimum number of nodes the network this game mode is allowed to run on
min_number_of_network_nodes: 18
# A lower vulnerability means that a node is less likely to be compromised
node_vulnerability_lower_bound: 0.2
# A higher vulnerability means that a node is more vulnerable
Expand Down
2 changes: 2 additions & 0 deletions tests/test_configs/red_config_test_5.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ BLUE:
relocating_deceptive_nodes_generates_a_new_node: True

GAME_RULES:
# Minimum number of nodes the network this game mode is allowed to run on
min_number_of_network_nodes: 18
# A lower vulnerability means that a node is less likely to be compromised
node_vulnerability_lower_bound: 0.1
# A higher vulnerability means that a node is more vulnerable
Expand Down
2 changes: 2 additions & 0 deletions tests/test_configs/red_config_test_broken_1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ BLUE:
relocating_deceptive_nodes_generates_a_new_node: True

GAME_RULES:
# Minimum number of nodes the network this game mode is allowed to run on
min_number_of_network_nodes: 18
# A lower vulnerability means that a node is less likely to be compromised
node_vulnerability_lower_bound: 0.7
# A higher vulnerability means that a node is more vulnerable
Expand Down
2 changes: 2 additions & 0 deletions tests/test_configs/red_config_test_broken_2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ BLUE:
relocating_deceptive_nodes_generates_a_new_node: True

GAME_RULES:
# Minimum number of nodes the network this game mode is allowed to run on
min_number_of_network_nodes: 18
# A lower vulnerability means that a node is less likely to be compromised
node_vulnerability_lower_bound: 0.7
# A higher vulnerability means that a node is more vulnerable
Expand Down
2 changes: 2 additions & 0 deletions tests/test_configs/red_config_test_broken_3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ BLUE:
relocating_deceptive_nodes_generates_a_new_node: True

GAME_RULES:
# Minimum number of nodes the network this game mode is allowed to run on
min_number_of_network_nodes: 18
# A lower vulnerability means that a node is less likely to be compromised
node_vulnerability_lower_bound: 0.7
# A higher vulnerability means that a node is more vulnerable
Expand Down
2 changes: 2 additions & 0 deletions tests/test_configs/spreading_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ BLUE:
relocating_deceptive_nodes_generates_a_new_node: True

GAME_RULES:
# Minimum number of nodes the network this game mode is allowed to run on
min_number_of_network_nodes: 18
# A lower vulnerability means that a node is less likely to be compromised
node_vulnerability_lower_bound: 0.2
# A higher vulnerability means that a node is more vulnerable
Expand Down
2 changes: 2 additions & 0 deletions tests/test_configs/too_many_high_value_targets_provided.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ BLUE:
relocating_deceptive_nodes_generates_a_new_node: True

GAME_RULES:
# Minimum number of nodes the network this game mode is allowed to run on
min_number_of_network_nodes: 18
# A lower vulnerability means that a node is less likely to be compromised
node_vulnerability_lower_bound: 0.2
# A higher vulnerability means that a node is more vulnerable
Expand Down
Empty file.
Loading

0 comments on commit bf19ddc

Please sign in to comment.