23 lines
657 B
Gherkin
23 lines
657 B
Gherkin
Feature: /shell command — run host shell commands
|
|
|
|
Background:
|
|
Given user "user_abc123" is sending commands
|
|
|
|
Scenario: No arguments shows usage
|
|
When user sends "/shell"
|
|
Then reply contains "Usage: /shell"
|
|
|
|
Scenario: Runs echo and returns output
|
|
When user sends "/shell echo hello"
|
|
Then reply contains "hello"
|
|
And reply contains "exit code: 0"
|
|
|
|
Scenario: Blocked dangerous command is rejected
|
|
When user sends "/shell rm -rf /"
|
|
Then reply contains "Blocked"
|
|
And reply does not contain "exit code"
|
|
|
|
Scenario: Non-zero exit code is reported
|
|
When user sends "/shell exit 1"
|
|
Then reply contains "exit code"
|