question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Port wildcard support for nockBack mocks

See original GitHub issue

Context

Currently you need to explicitly manage port on which your test application is running when executing nockBack mocks so that recorded port matches the one you are currently running application on. This is a major inconvenience since supertest randomizes execution port.

It should be possible to specify wildcard port (*) that would match request against any possible port value or possibly its absence. Alternatively a parameter that would accept any port or its absence when no port is specified could also be a solution.

Alternatives

It is possible to manually launch and stop server for application under test that would be listening to specific port, but starting and stopping server manually is both introducing additional boilerplate and is not even that easy when you are executing multiple tests in parallel (as then you have to solve port collision problem yourself).

If the feature request is accepted, would you be willing to submit a PR?

Yes

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
kibertoadcommented, Nov 7, 2021

@gr2m I would be happy to. Please ping me when there will be something I could be moving it to.

1reaction
simlucommented, Apr 20, 2022

The problem is that the code base is really hard to work with. So I couldn’t figure out where the appropriate place to add this feature was

But the request is very much still relevant

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enhanced wildcard support for jobname on PORT and ... - IBM
z/OS V2R3 Communications Server enhances the wildcard support for the jobname parameter on the PORT and PORTRANGE TCP/IP configuration statements.
Read more >
Use wild card in mock service URL - Stack Overflow
You can configure as url path only / this way all request to http://your.mock.host:port/ will be processed in mockService.
Read more >
Are port wildcards supported? (PKCE for Desktop apps)
There's no way to allow for any wildcard port on the callback URLs, the port has to be explicitly configured. system closed March...
Read more >
How to Block Ports while using Wildcard Virtual Service
The LoadMaster can blacklist or whitelist IPs but you cannot block ports using an ACL. This article shows you how to block a...
Read more >
Rage 2 Every Ark Location - yarimaltinfiyatlari.com
Every one of them contains a number of useful items and weapons to help you and ... the strongest weapon, but with the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found