[E2E Test] Add E2E test for using orchestration and a reactor
Open
Nobody has claimed this yet.
Tests
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Add E2E test for the following scenario:
- Add orchestration and normal sls state:
/srv/salt/orch.sls:
run_user_state:
salt.state:
- tgt: poc-minion
- sls:
- user
orch1_complete:
salt.runner:
- name: event.send
- tag: my_event/orch1/complete
- data:
foo: bar
- require:
- salt: run_user_state
/srv/salt/user.sls
testuser:
user.present
- Add reactor Salt master configuration
/etc/salt/master.d/reactor.conf
reactor:
- "my_event/orch1/complete":
- /srv/salt/reactor.sls
- Add reactor sls file
/srv/salt/reactor.sls
add_file:
local.state.single:
- tgt: "*"
- args:
- fun: file.managed
- name: /tmp/path
- contents: "test content"
add_file2_initial:
local.file.touch:
- tgt: "*"
- args:
- name: "/tmp/path2"
add_file2:
local.file.append:
- tgt: "*"
- args:
- path: /tmp/path2
- args: "test2 content"
- Run the orchestration file
salt-run state.orchestrate orch
- Confirm that both /tmp/path and /tmp/path2 files where created with the correct contents
(py-3.10) ch3ll@megan-precision5550 ~/git/salt add_pillar_docs cat /tmp/path2 /tmp/path
test2 content
test content
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Use the supplied orch.sls, user.sls, reactor.conf, and reactor.sls scenarios as test fixtures. Start by running salt-run state.orchestrate orch in an environment with the described master and minion setup, then verify that /tmp/path contains "test content" and /tmp/path2 contains "test2 content". Done means the E2E test reliably covers orchestration, event triggering, and both reactor actions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devops, infrastructure, testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100