目录
morenod

Add comprehensive tests for action precondition

This patch adds a new test suite TestExecuteSkippedActions that validates the precondition checking logic for various Watcher actions. These tests ensure that actions are properly skipped when preconditions are not met (resulting in SKIPPED state with SUCCEEDED action plan) or fail appropriately when invalid parameters are provided (resulting in FAILED state for both action and action plan).

The test suite covers 14 scenarios across 5 action types:

All tests follow a consistent pattern using a helper method execute_actions_and_validate_states() that:

  • Creates audit templates and audits with custom actions
  • Optionally executes pre-execution hooks (e.g., deleting resources)
  • Executes action plans and waits for completion
  • Validates expected action states and action plan final state
  • Returns action details for additional verification

As this feature is not backported, skipped actions have to be excluded from 2025* and 2024* branches on watcher project zuul jobs definition

Change-Id: Ifaf9ed0b00d9a38031a824e0a11aa91b04e06ec4 Assisted-By: Claude Signed-off-by: morenod dsanzmor@redhat.com

17天前417次提交
关于
721.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802047560号