Skip to content

TT-17688: test: add local httpbin.org mock to smoke tests (backport #8409)#8418

Merged
buger merged 1 commit into
release-5.14.0from
backport-8409-release-5.14.0
Jul 1, 2026
Merged

TT-17688: test: add local httpbin.org mock to smoke tests (backport #8409)#8418
buger merged 1 commit into
release-5.14.0from
backport-8409-release-5.14.0

Conversation

@probelabs

@probelabs probelabs Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Problem / Task

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. Also, the kennethreitz/httpbin image is outdated, so we are updating it to mccutchen/go-httpbin.

Requested by: U3P2L4XNE
Slack thread: https://slack.com/archives/C0ATZQCMG58/p1782915217567649

Changes

  • Added httpbin.org service using mccutchen/go-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.
  • Updated all other usages of kennethreitz/httpbin to mccutchen/go-httpbin across the repository.

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.

@probelabs
probelabs Bot requested a review from a team as a code owner July 1, 2026 15:25
@sentinelone-cnapp-eu1

Copy link
Copy Markdown

SentinelOne CNS Hardcoded Secret Detector
✅ Congratulations, your code is safe

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.

@probelabs

probelabs Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

This pull request backports a change from PR #8409 to the release-5.14.0 branch. The change enhances the reliability of the smoke tests by replacing the external dependency on the public httpbin.org service with a local, containerized mock.

Files Changed Analysis

  • ci/smoke-tests/plugin-aliasing/docker-compose.yml: This file was modified to add a new service definition. Three lines were added to introduce a service named httpbin.org that uses the standard kennethreitz/httpbin Docker image. This makes the test environment self-contained.

Architecture & Impact Assessment

  • What this PR accomplishes: It improves the stability and reliability of the plugin-aliasing smoke tests by removing a dependency on an external service. This prevents test failures due to network issues or the unavailability of the public httpbin.org.
  • Key technical changes introduced: A new service is added to the Docker Compose configuration for the smoke tests. Docker's internal networking will resolve requests to httpbin.org to this new local container, seamlessly redirecting test traffic without requiring changes to the test code itself.
  • Affected system components: The change is strictly limited to the CI/CD testing environment, specifically the plugin-aliasing smoke test suite. There is no impact on the production application code.

Here is a visualization of the change:

Before:

graph TD
    subgraph Smoke Test Environment
        TestRunner -->|HTTP Request| TykGateway
        TykGateway -->|Proxied Request| ExternalHttpbin(httpbin.org public service)
    end
Loading

After:

graph TD
    subgraph "Smoke Test Environment (Docker Compose)"
        TestRunner -->|HTTP Request| TykGateway
        TykGateway -->|Proxied Request| LocalHttpbin(httpbin.org container)
    end

Loading

Scope Discovery & Context Expansion

  • The change is scoped to the plugin-aliasing smoke tests, suggesting that this particular test suite relies on an upstream service for validating functionality.
  • By naming the local service httpbin.org, the tests that target this hostname will automatically be routed to the local container by Docker's DNS, which is a common and effective technique for mocking dependencies in integration tests.
  • This pattern of replacing external dependencies could potentially be applied to other smoke tests within the ci/smoke-tests/ directory to further improve the overall robustness of the CI pipeline.
Metadata
  • Review Effort: 1 / 5
  • Primary Label: chore

Powered by Visor from Probelabs

Last updated: 2026-07-01T15:26:48.768Z | Triggered by: pr_opened | Commit: 96de147

💡 TIP: You can chat with Visor using /visor ask <your question>

@probelabs

probelabs Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

Security Issues (1)

Severity Location Issue
🟡 Warning ci/smoke-tests/plugin-aliasing/docker-compose.yml:22
The Docker image `kennethreitz/httpbin` is used without a specific version tag, implicitly using `latest`. The `latest` tag can introduce breaking changes or security vulnerabilities over time, leading to non-reproducible builds. This specific image is known to be outdated and contains multiple known vulnerabilities in its base image and dependencies.
💡 SuggestionTo improve security and ensure build reproducibility, pin the Docker image to a specific digest using `image: kennethreitz/httpbin@sha256:...`. For better long-term security, consider switching to a more actively maintained alternative, such as `postman/httpbin`, and pinning it to a specific version tag (e.g., `postman/httpbin:1.0.0`).

✅ Architecture Check Passed

No architecture issues found – changes LGTM.

✅ Performance Check Passed

No performance issues found – changes LGTM.


Powered by Visor from Probelabs

Last updated: 2026-07-01T15:26:33.456Z | Triggered by: pr_opened | Commit: 96de147

💡 TIP: You can chat with Visor using /visor ask <your question>

@buger
buger merged commit 1bb805a into release-5.14.0 Jul 1, 2026
14 of 15 checks passed
@buger
buger deleted the backport-8409-release-5.14.0 branch July 1, 2026 15:31
@probelabs probelabs Bot changed the title test: add local httpbin.org mock to smoke tests (backport #8409) TT-17688: test: add local httpbin.org mock to smoke tests (backport #8409) Jul 2, 2026
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

🚨 Jira Linter Failed

Commit: 96de147
Failed at: 2026-07-02 18:10:21 UTC

The Jira linter failed to validate your PR. Please check the error details below:

🔍 Click to view error details
failed to validate branch and PR title rules: branch name 'backport-8409-release-5.14.0' must contain a valid Jira ticket ID (e.g., ABC-123)

Next Steps

  • Ensure your branch name contains a valid Jira ticket ID (e.g., ABC-123)
  • Verify your PR title matches the branch's Jira ticket ID
  • Check that the Jira ticket exists and is accessible

This comment will be automatically deleted once the linter passes.

buger added a commit that referenced this pull request Jul 6, 2026
…e (5.14.0) (#8450)

Reverts the httpbin test-infra migration back to the pre-migration
baseline.

Supersedes/Reverts:
- tyk #8418
- tyk #8428
- tyk #8440

Jira: https://tyktech.atlassian.net/browse/DX-2386
Requested by: U3P2L4XNE
Slack thread: https://slack.com/archives/D09SZABNLG3/p1783328328323169

- [x] No go.mod changes

---------

Co-authored-by: Leonid Bugaev <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant