StackStorm / StackStorm/st2

Code infrastructure and support for local and remote command runner action unit tests

Open
#2,522 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement feature
Dominant language
Python
Stars
6.5k
Forks
787
PR merge metrics
No merged PRs in 30d

Description

We now have an infrastructure and code in place for writing Python runner action unit tests, but we don't have such code infrastructure in place for other runners such as local and remote ones.

We should add some code infrastructure in-place which will make writing such tests easier. We can start simple by adding some code infrastructure for writing remote and local command runner action tests. In this case we can simply intercept a final shell command and return it to the test case which can assert that the command is correct.

This is still valuable since a lot of actions (e.g. many of the actions in linux pack) consists of metadata which dynamically constructs a command based on the action parameters.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing Python runner action unit-test infrastructure, then locate the local and remote command runner paths. The work is done when tests for both runners can intercept the final shell command and assert that it matches the expected command for the action parameters.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.