Skip to content

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

Merged
buger merged 1 commit into
masterfrom
fix-smoke-tests-httpbin
Jul 1, 2026
Merged

TT-17688: test: add local httpbin.org mock to smoke tests#8409
buger merged 1 commit into
masterfrom
fix-smoke-tests-httpbin

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:04
@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 PR adds a local httpbin.org mock to the plugin-aliasing smoke test to remove its dependency on the public service, preventing test failures due to external outages.

Files Changed Analysis

  • ci/smoke-tests/plugin-aliasing/docker-compose.yml: A new service named httpbin.org was added, using the kennethreitz/httpbin Docker image. This change is minimal, with only 3 lines added.

Architecture & Impact Assessment

  • Accomplishment: The PR makes the smoke tests more reliable by replacing a flaky external dependency with a stable, local mock service.
  • Technical Changes: It leverages Docker's internal DNS by naming the service httpbin.org. Requests from other containers in the same Docker network to this hostname will now resolve to the local httpbin container instead of the public internet.
  • Affected Components: The change is confined to the plugin-aliasing smoke test environment. The primary impact is improved stability for the CI pipeline that executes these tests.
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

Loading

Scope Discovery & Context Expansion

The 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 ci/smoke-tests/go-plugin-auth/) already use this local httpbin.org mock. This PR aligns the plugin-aliasing test with existing best practices, reducing the overall test suite's reliance on external services.

Metadata
  • Review Effort: 1 / 5
  • Primary Label: chore

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 /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:21
The Docker image `kennethreitz/httpbin` is deprecated and has not been updated in several years. Using unmaintained images introduces a significant risk of including unpatched vulnerabilities from the base image or application dependencies. This change also uses an implicit `latest` tag, which makes the test environment non-reproducible.
💡 SuggestionReplace the deprecated image with a maintained alternative, such as `postman/httpbin`. It is also a security best practice to pin the image to a specific digest (e.g., `image: postman/httpbin@sha256:...`) or a fixed version tag instead of relying on an implicit `latest` tag to ensure reproducible builds and prevent pulling in untrusted or vulnerable code.

✅ Performance Check Passed

No performance issues found – changes LGTM.

Quality Issues (1)

Severity Location Issue
🟡 Warning ci/smoke-tests/plugin-aliasing/docker-compose.yml:21
The Docker image `kennethreitz/httpbin` is unpinned, which can lead to test instability if a new version introduces breaking changes. The image has not been updated in over 4 years, increasing the risk of it containing unpatched vulnerabilities.
💡 SuggestionPin the Docker image to a specific digest (e.g., `kennethreitz/httpbin@sha256:...`) to ensure reproducible builds. Consider using a more actively maintained alternative image for httpbin, or host a fork to control updates and apply security patches.

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 /visor ask <your question>

@buger
buger merged commit 89e0986 into master Jul 1, 2026
48 of 51 checks passed
@buger
buger deleted the fix-smoke-tests-httpbin branch July 1, 2026 15:19
buger added a commit that referenced this pull request Jul 1, 2026
…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>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</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>&nbsp;
&nbsp; &nbsp; </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]>
buger added a commit that referenced this pull request Jul 1, 2026
…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]>
buger added a commit that referenced this pull request Jul 1, 2026
## 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]>
probelabs Bot pushed a commit that referenced this pull request Jul 1, 2026
buger added a commit that referenced this pull request Jul 1, 2026
@probelabs probelabs Bot changed the title test: add local httpbin.org mock to smoke tests TT-17688: test: add local httpbin.org mock to smoke tests Jul 2, 2026
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

🚨 Jira Linter Failed

Commit: 24b172a
Failed at: 2026-07-02 18:10:09 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 'fix-smoke-tests-httpbin' 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.

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