Skip to content

MSW seems not to work with kafka testcontainers #1600

@ofekdeitch-oligo

Description

@ofekdeitch-oligo

Prerequisites

Environment check

  • I'm using the latest msw version
  • I'm using Node.js version 14 or higher

Node.js version

18.16.0

Reproduction repository

https://github.com/ofekdeitch-oligo/msw-testcontainers-bug

Reproduction steps

run:

  1. nvm use
  2. npm install
  3. npm run test

Notice that there are 2 tests running:

  1. Without MSW
  2. With MSW

Test (1) passes, but test (2) fails.

I've also added the method bypassRoutes that creates routes using req.passthrough(), but test (2) continues to fail.

Current behavior

When setting up an MSW server, the testcontainers library fails to create a Kafka container.

Expected behavior

MSW would bypass the requests that testcontainers relies on, so that a Kafka container would be created successfully.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds:triageIssues that have not been investigated yet.scope:nodeRelated to MSW running in Node

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions