Add Helpdesk smoke test
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
# Helpdesk Smoke Test
|
||||
|
||||
Use `helpdesk_smoke_test.py` to verify that the LAN Redmine copy, Mailpit, and
|
||||
redMCP work together on real Helpdesk issues.
|
||||
|
||||
The test creates one inbound Helpdesk email for `fud-helpdesk`, triggers
|
||||
Helpdesk mail import, fetches the created issue through
|
||||
`RedMCP\RedmineClient::issueWithHelpdesk()`, performs a non-Helpdesk CRUD
|
||||
control in `fud-nohelpdesk`, sends a Helpdesk reply through the same mailer path
|
||||
used by the UI's "Send note" checkbox, verifies the outbound message arrives in
|
||||
Mailpit, and closes the Helpdesk issue.
|
||||
|
||||
## Run
|
||||
|
||||
```sh
|
||||
./helpdesk_smoke_test.py
|
||||
```
|
||||
|
||||
Defaults:
|
||||
|
||||
- Redmine: `http://192.168.50.170`
|
||||
- Mailpit: `192.168.1.105`, SMTP `1025`, HTTP `8025`
|
||||
- Helpdesk project: `fud-helpdesk`
|
||||
- CRUD control project: `fud-nohelpdesk`
|
||||
- API key source: `REDMINE_API_KEY`, `REDMNINE_API_KEY`, or `redMCP/.env`
|
||||
|
||||
The script runs `./validate_test_instance.py` first. To skip that preflight
|
||||
while debugging:
|
||||
|
||||
```sh
|
||||
./helpdesk_smoke_test.py --skip-preflight
|
||||
```
|
||||
|
||||
## Expected Result
|
||||
|
||||
The final output should include:
|
||||
|
||||
```text
|
||||
[OK] redMCP issueWithHelpdesk returned ticket and message context
|
||||
[OK] redMCP non-Helpdesk CRUD control passed
|
||||
[OK] Mailpit received outbound Helpdesk/Redmine mail containing the reply token
|
||||
[OK] Closed smoke-test Helpdesk issue
|
||||
Smoke test passed.
|
||||
```
|
||||
|
||||
Closed smoke-test tickets are intentionally retained in `fud-helpdesk` as audit
|
||||
evidence. Their subjects start with `[redMCP-smoke ...]`.
|
||||
@@ -123,7 +123,19 @@ php -l redMCP/app/redmineClient.php
|
||||
Use the existing redMCP examples in `redMCP/README.md` for read and CRUD smoke
|
||||
tests against the LAN Redmine copy.
|
||||
|
||||
## 7. Re-Run The Read-Only Validator
|
||||
## 7. Run The Helpdesk Smoke Test
|
||||
|
||||
After the post-import checks pass, run the live Helpdesk/redMCP smoke test:
|
||||
|
||||
```sh
|
||||
./helpdesk_smoke_test.py
|
||||
```
|
||||
|
||||
This imports a controlled Helpdesk email, verifies `issueWithHelpdesk()`, checks
|
||||
non-Helpdesk CRUD, verifies outbound Mailpit delivery, and closes the created
|
||||
test ticket. Details are in `docs/helpdesk_smoke_test.md`.
|
||||
|
||||
## 8. Re-Run The Read-Only Validator
|
||||
|
||||
Finish by running:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user