blob: 78c9a9cccf1bfd806f1b1e33a6cd9f0c81bd6363 [file] [log] [blame]
== Camel Quarkus Slack Integration Tests
By default the Slack integration tests use WireMock to stub the API interactions.
To run the `camel-quarkus-Slack` integration tests against the real API, you must first create a Slack account and workspace https://slack.com/get-started#/create.
Create a channel named `test-channel`.
Youll need to create a Slack app and use it on your workspace.
Use the 'User OAuth Token' as token for the producer and consumer endpoints. Set the corresponding scopes for Bot Token:
* `channels:history`
* `groups:history`
* `im:history`
* `mpim:history`
* `channels:read`
* `groups:read`
* `im:read`
* `mpim:read`
* `chat:write`
Install your app for the channel `test-channel`.
Add an `Incoming Webhook` for you app.
Invite the bot in the channel `test-channel`.
[source]
----
/invite @BOT_NAME
----
Next set the following environment variables:
[source,shell]
----
export SLACK_TOKEN=your-slack-token
export SLACK_SERVER_URL=https://slack.com
export SLACK_WEBHOOK_URL=https://hooks.slack.com/services/some/webhook/path
----
If the WireMock stub recordings need updating, then remove the existing files from `src/test/resources/mappings` and run tests with either:
System property `-Dwiremock.record=true`
Or
Set environment variable `WIREMOCK_RECORD=true`