Skip to content

Commit

Permalink
update check reason skipped tests error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
bleepbop committed Aug 14, 2023
1 parent 91cf84a commit 9aab656
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/objects/test_operation.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ def test_check_reason_skipped_unknown_platform(self, test_agent, test_ability):
op = Operation(name='test', agents=[test_agent], state='running')
reason = op._check_reason_skipped(agent=test_agent, ability=test_ability, op_facts=[], state=op.state,
agent_executors=test_agent.executors, agent_ran={})
assert reason['reason'] == 'No platform specified'
assert reason['reason'] == 'Platform not available'
assert reason['reason_id'] == Operation.Reason.PLATFORM.value
assert reason['ability_id'] == test_ability.ability_id
assert reason['ability_name'] == test_ability.name
Expand All @@ -513,7 +513,7 @@ async def test_check_reason_skipped_valid_executor(self, test_agent, test_abilit
op = Operation(name='test', agents=[test_agent], state='running')
reason = op._check_reason_skipped(agent=test_agent, ability=test_ability, op_facts=[], state=op.state,
agent_executors=[], agent_ran={})
assert reason['reason'] == 'Executor is unavailable'
assert reason['reason'] == 'Mismatched ability platform and executor'
assert reason['reason_id'] == Operation.Reason.EXECUTOR.value
assert reason['ability_id'] == test_ability.ability_id
assert reason['ability_name'] == test_ability.name
Expand Down Expand Up @@ -553,7 +553,7 @@ async def test_check_reason_skipped_link_ignored(self, custom_agent, test_abilit
op.ignored_links = [test_link.id]
reason = op._check_reason_skipped(agent=agent, ability=test_ability, op_facts=[], state=op.state,
agent_executors=agent.executors, agent_ran={})
assert reason['reason'] == 'Link was ignored'
assert reason['reason'] == 'Link ignored - highly visible or discarded link'
assert reason['reason_id'] == Operation.Reason.LINK_IGNORED.value
assert reason['ability_id'] == test_ability.ability_id
assert reason['ability_name'] == test_ability.name
Expand All @@ -563,7 +563,7 @@ async def test_check_reason_skipped_untrusted(self, custom_agent, test_ability,
op = Operation(name='test', agents=[agent], state='running')
reason = op._check_reason_skipped(agent=agent, ability=test_ability, op_facts=[], state=op.state,
agent_executors=agent.executors, agent_ran={})
assert reason['reason'] == 'Untrusted'
assert reason['reason'] == 'Agent not trusted'
assert reason['reason_id'] == Operation.Reason.UNTRUSTED.value
assert reason['ability_id'] == test_ability.ability_id
assert reason['ability_name'] == test_ability.name
Expand Down

0 comments on commit 9aab656

Please sign in to comment.