feat(discordsh): Mockoon docker-compose POC for local E2E testing#8221
Merged
feat(discordsh): Mockoon docker-compose POC for local E2E testing#8221
Conversation
…#8180) Add GITHUB_API_BASE_URL env var support to GitHubClient usage in both slash commands and the scheduler, enabling API redirection to mock backends. Create Mockoon mock definitions for GitHub REST API (issues, pulls, repo metadata, error scenarios) and Discord REST API (messages, gateway, interactions, commands). Wire everything up in a docker-compose-poc-dev.yaml with healthchecks.
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
…ests (#8180) Add playwright.mock.config.ts that manages the full docker-compose lifecycle (mockoon-github + mockoon-discord + discordsh), a 15-test mock-api.spec.ts covering GitHub mock routes, Discord mock endpoints, error scenarios, and bot health/frontend through the mock stack. Fix docker-compose healthchecks: use 127.0.0.1 instead of localhost (Alpine resolves localhost to IPv6), add --hostname 0.0.0.0 to Mockoon CLI commands, and add start_period for reliable startup. Support pre-built image via DISCORDSH_IMAGE env var to skip rebuilds in CI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #8180 | Parent: #7849 | Related: #8150, #7856
GITHUB_API_BASE_URLenv var support toGitHubClientusage in both slash commands and the scheduler, enabling API redirection to mock backendsdocker-compose-poc-dev.yamlwith healthchecks and zero-credential local testingArchitecture
Files
apps/discordsh/poc/docker-compose-poc-dev.yaml— orchestrationapps/discordsh/poc/mockoon/github-mock.json— GitHub API mock (6 routes)apps/discordsh/poc/mockoon/discord-mock.json— Discord REST mock (5 routes)apps/discordsh/poc/README.md— developer instructions + CI integration guideapps/discordsh/axum-discordsh/src/discord/commands/github_board.rs— env var overrideapps/discordsh/axum-discordsh/src/discord/scheduler.rs— env var overrideKnown Limitations
Test Plan
docker compose up mockoon-github mockoon-discordboots and healthchecks passcurl localhost:4010/repos/KBVE/kbve/issuesreturns canned issues (200)curl localhost:4010/repos/unauthorized/test/issuesreturns 401curl localhost:4010/repos/forbidden/test/issuesreturns 403curl localhost:4010/repos/notfound/test/issuesreturns 404curl -X POST localhost:4011/api/v10/channels/123/messagesreturns mock messagedocker compose upwith realDISCORD_TOKEN(requires test bot app)