DEVX-66: fix: calibrate molecule weights from actual CI execution times
This commit is contained in:
@@ -483,7 +483,7 @@ class TestCliMultiRole:
|
||||
|
||||
class TestScenarioWeight:
|
||||
def test_known_heavy_scenario(self) -> None:
|
||||
assert _scenario_weight("nextcloud") == 10
|
||||
assert _scenario_weight("nextcloud") == 15
|
||||
assert _scenario_weight("gitea") == 8
|
||||
|
||||
def test_known_light_scenario(self) -> None:
|
||||
@@ -493,13 +493,32 @@ class TestScenarioWeight:
|
||||
assert _scenario_weight("unknown-scenario") == 3
|
||||
|
||||
def test_case_insensitive(self) -> None:
|
||||
assert _scenario_weight("NextCloud") == 10
|
||||
assert _scenario_weight("NextCloud") == 15
|
||||
assert _scenario_weight("GITEA") == 8
|
||||
|
||||
def test_substring_match(self) -> None:
|
||||
assert _scenario_weight("nextcloud-with-redis") == 10
|
||||
assert _scenario_weight("nextcloud-with-redis") == 15
|
||||
assert _scenario_weight("custom-gitea-setup") == 8
|
||||
|
||||
def test_role_specific_weight(self) -> None:
|
||||
"""Role+scenario pairs take priority over scenario-name-only weights."""
|
||||
assert _scenario_weight("default", "restore") == 11
|
||||
assert _scenario_weight("default", "zitadel") == 10
|
||||
assert _scenario_weight("default", "docker_base") == 8
|
||||
assert _scenario_weight("default", "app_hardening") == 4
|
||||
assert _scenario_weight("default", "app_container") == 3
|
||||
assert _scenario_weight("default", "storage") == 3
|
||||
assert _scenario_weight("default", "observability") == 3
|
||||
|
||||
def test_role_specific_overrides_scenario_name(self) -> None:
|
||||
"""vaultwarden has a scenario-name weight of 2, but role-specific is also 2."""
|
||||
assert _scenario_weight("vaultwarden", "app_container") == 2
|
||||
assert _scenario_weight("vaultwarden") == 2
|
||||
|
||||
def test_customer_apps_weight(self) -> None:
|
||||
assert _scenario_weight("customer-apps", "app_container") == 11
|
||||
assert _scenario_weight("customer-apps") == 11
|
||||
|
||||
|
||||
class TestLptDistribute:
|
||||
def test_equal_weights_produce_even_split(self) -> None:
|
||||
|
||||
Reference in New Issue
Block a user