TT-17688: test: add local httpbin.org mock to smoke tests#8409
Conversation
|
SentinelOne CNS Hardcoded Secret Detector SentinelOne CNS is a cloud-agnostic, agentless CSPM & CWPP solution that continuously detects and prevents vulnerabilities that have the highest probability of being exploited in Azure, AWS, Google Cloud, and Kubernetes. |
|
This PR adds a local Files Changed Analysis
Architecture & Impact Assessment
graph TD
subgraph "Test Environment (docker-compose)"
A[Tyk Gateway] --> B{httpbin.org service};
end
subgraph "Before Change"
B --|Resolves to|--> C[Public httpbin.org];
end
subgraph "After Change"
B --|Resolves to|--> D[Local httpbin container];
end
Scope Discovery & Context ExpansionThe change is localized to a single smoke test but follows an established pattern within the repository to ensure test reliability. A quick search confirms that other smoke tests (e.g., in Metadata
Powered by Visor from Probelabs Last updated: 2026-07-01T15:05:20.489Z | Triggered by: pr_opened | Commit: 24b172a 💡 TIP: You can chat with Visor using |
Security Issues (1)
✅ Performance Check PassedNo performance issues found – changes LGTM. Quality Issues (1)
Powered by Visor from Probelabs Last updated: 2026-07-01T15:05:18.989Z | Triggered by: pr_opened | Commit: 24b172a 💡 TIP: You can chat with Visor using |
…lease-5.8) (#8420) ### **User description** ## Problem / Task Backport PR #8409 to release branch `release-5.8`. The smoke tests are failing because they rely on the public `httpbin.org` service, which was down. We need to remove the public `httpbin.org` dependency from smoke tests by adding a local mock service to `docker-compose.yml`. Requested by: U3P2L4XNE Slack thread: https://slack.com/archives/C0ATZQCMG58/p1782915217567649 ## Changes - Added `httpbin.org` service using `kennethreitz/httpbin` image to `ci/smoke-tests/plugin-aliasing/docker-compose.yml`. This allows Docker's internal DNS to intercept requests to `httpbin.org` and route them to the local container, avoiding reliance on the public internet. ## Testing - Verified that the `httpbin.org` service is added to the `docker-compose.yml` file. - Other tests in `ci/tests/` already use this pattern successfully. ___ ### **PR Type** Tests, Bug fix ___ ### **Description** - Add local `httpbin.org` test service - Remove public network smoke-test dependency - Improve plugin-aliasing smoke test reliability ___ ### Diagram Walkthrough ```mermaid flowchart LR smoke["plugin-aliasing smoke tests"] docker["docker-compose.yml services"] localHttpbin["local httpbin.org container"] internet["public httpbin.org dependency"] smoke -- "uses" --> docker docker -- "adds" --> localHttpbin localHttpbin -- "replaces" --> internet ``` <details> <summary><h3> File Walkthrough</h3></summary> <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Tests</strong></td><td><table> <tr> <td> <details> <summary><strong>docker-compose.yml</strong><dd><code>Add local httpbin service for smoke tests</code> </dd></summary> <hr> ci/smoke-tests/plugin-aliasing/docker-compose.yml <ul><li>Add <code>httpbin.org</code> service to Compose<br> <li> Use <code>kennethreitz/httpbin</code> container image<br> <li> Keep requests inside Docker network<br> <li> Remove reliance on public <code>httpbin.org</code></ul> </details> </td> <td><a href="https://github.com/TykTechnologies/tyk/pull/8420/files#diff-3c4edc1dc5e7492a08b9ec1e7e534963f4a1cf3001b19c0c903ab52f3b4a082b">+3/-0</a> </td> </tr> </table></td></tr></tr></tbody></table> </details> ___ Co-authored-by: probelabs[bot] <219682034+probelabs[bot]@users.noreply.github.com> Co-authored-by: Leonid Bugaev <[email protected]>
…lease-5.14) (#8419) ## Problem / Task Backport PR #8409 to release branch release-5.14 to fix smoke tests failing due to public httpbin.org being down. Requested by: U3P2L4XNE Slack thread: https://slack.com/archives/C0ATZQCMG58/p1782915217567649 ## Changes - Added local `httpbin.org` mock service using `kennethreitz/httpbin` image to `ci/smoke-tests/plugin-aliasing/docker-compose.yml` ## Testing - Smoke tests will now use the local mock instead of the public service. Co-authored-by: Leonid Bugaev <[email protected]>
## Problem / Task Backport PR #8409 to release branch release-5.14.0. ## Changes Added a local mock of the `httpbin.org` service to the smoke tests' `docker-compose.yml` file (`ci/smoke-tests/plugin-aliasing/docker-compose.yml`). ## Testing Smoke tests will use the local mock instead of the public httpbin.org service. --- Requested by: U3P2L4XNE Slack thread: https://slack.com/archives/C0ATZQCMG58/p1782915217567649 Co-authored-by: Leonid Bugaev <[email protected]>
Backport of PR #8409 to release-5.13.1
Backport of PR #8409 to release-5.13.1. Requested by: U3P2L4XNE Slack thread: https://slack.com/archives/C0ATZQCMG58/p1782915217567649 Co-authored-by: Leonid Bugaev <[email protected]>
🚨 Jira Linter FailedCommit: The Jira linter failed to validate your PR. Please check the error details below: 🔍 Click to view error detailsNext Steps
This comment will be automatically deleted once the linter passes. |
Problem / Task
The smoke tests are failing because they rely on the public
httpbin.orgservice, which was down. We need to remove the publichttpbin.orgdependency from smoke tests by adding a local mock service todocker-compose.yml. Also, thekennethreitz/httpbinimage is outdated, so we are updating it tomccutchen/go-httpbin.Requested by: U3P2L4XNE
Slack thread: https://slack.com/archives/C0ATZQCMG58/p1782915217567649
Changes
httpbin.orgservice usingmccutchen/go-httpbinimage toci/smoke-tests/plugin-aliasing/docker-compose.yml. This allows Docker's internal DNS to intercept requests tohttpbin.organd route them to the local container, avoiding reliance on the public internet.kennethreitz/httpbintomccutchen/go-httpbinacross the repository.Testing
httpbin.orgservice is added to thedocker-compose.ymlfile.ci/tests/already use this pattern successfully.