Slack tests
Verify live Slack ingress and a gateway-authored reply through dedicated Codex. Prepare the Kubernetes runtime setup and private credential file first.
Slack
Use the linked Kubernetes runtime prerequisites and model credential, plus an
authorized test channel. The gateway image must already contain the Slack plugin
and its runtime dependencies. Run the runtime image smoke
before provisioning the cluster, and use a Codex app-server version accepted by
the gateway's installed Codex plugin. Successful --version commands alone do
not prove that the two runtimes are compatible.
Put the three Slack tokens in the private environment
file. Set OCC_TEST_SLACK_CHANNEL_ID and OCC_TEST_SLACK_PROXY_URL; the proxy URL
must have a literal IP and explicit port. Both bots must belong to the same
workspace and have joined the channel. Use an existing Socket Mode app configured
to receive the test messages.
OCC_TEST_SLACK_LIVE=1 \ node --env-file="$TEST_ENV_FILE" --test tests/integration/harness-topology-k3d-slack-real.test.mjsThis posts real Slack messages and leaves them in the channel. It verifies the reply and exact runtime/session evidence. The sender bot must differ from the Agent bot; its credential remains with the test runner. Run this file and the ordinary runtime file for both coverage groups. See Slack test settings.
Two-bot fixture configuration
Slack is the only channel with live integration coverage; this suite does not
verify Teams. The test temporarily adds allowBots: "mentions",
users: ["<sender-bot-user-id>"], and replyToMode: "off" only to the exact test
channel. requireMention stays enabled. Do not enable bot access account-wide.
Slack test environment
OCC_TEST_SLACK_LIVE=1 enables
harness-topology-k3d-slack-real.test.mjs.
Run the ordinary runtime file separately for its coverage. The Slack case uses the same production k3d,
PostgreSQL, image, and model-turn prerequisites, then posts a real message and
waits for a gateway-authored reply. It does not delete the Slack messages it
creates.
| Variable | Requirement |
|---|---|
OCC_TEST_SLACK_LIVE |
Set to 1 to run the selected live Slack case instead of the ordinary real-runtime cases. |
OCC_TEST_SLACK_PROXY_URL |
Approved exact literal-IP proxy URL with an explicit port for channel egress. |
OCC_TEST_SLACK_CHANNEL_ID |
Shared test channel joined by the gateway bot and the sender bot. |
SLACK_APP_TOKEN |
Gateway Socket Mode token; must start with xapp-. |
SLACK_BOT_TOKEN |
Gateway bot token; must start with xoxb-. |
OCC_TEST_SLACK_SENDER_BOT_TOKEN |
Distinct sender bot token in the same Slack workspace; must start with xoxb-. |
See the Slack testing guide for setup and cleanup expectations before selecting the live case.
