Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to close tcp connection by Imposter #742

Open
khmel-aleh opened this issue Sep 1, 2023 · 1 comment
Open

How to close tcp connection by Imposter #742

khmel-aleh opened this issue Sep 1, 2023 · 1 comment

Comments

@khmel-aleh
Copy link

I have a service that closes the connection after a response.

➜  ~ telnet my_server 18401
Trying 10.130.0.28...
Connected to my_server.
Escape character is '^]'.
hello
world!Connection closed by foreign host.

I need to do the same with mountebank
But when I create a stub

{
  "responses": [
    {
      "is": {
        "data": "d29ybGQh"
      }
    }
  ],
  "predicates": [
    {
      "contains": {
        "data": "aGVsbG8="
      }
    }
  ]
}

and send request the connection stays open


➜  ~ telnet localhost 5555
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
hello
world!\hello
world!hello
world!^]
telnet> close
Connection closed.

How to tell the imposter to close connection?

@carlbray
Copy link

I think you have to use the Telnet plugin where you can set the "protocol": "telnet"
https://github.com/telekom/mb-netmgmt

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

No branches or pull requests

2 participants