pytest-socket icon indicating copy to clipboard operation
pytest-socket copied to clipboard

feat: support cidr blocks in --allow-hosts

Open emhagman opened this issue 4 years ago • 6 comments

This feature allows --allow-hosts to support CIDR blocks. This is useful inside Docker since different services can get any range of IPs (typically on 172.17.0.0/16 or 172.20.0.0/16) and pytest-socket doesn't support hostnames.

I can also add hostname support if we think that is useful.

emhagman avatar Aug 18 '21 18:08 emhagman

Any chance of getting this merged? Would absolutely love this feature for our CI pipelines!
Alternatively #80 would also solve this issue for us.

ingvaldlorentzen avatar Nov 18 '21 15:11 ingvaldlorentzen

Any chance of getting this merged? Would absolutely love this feature for our CI pipelines! Alternatively #80 would also solve this issue for us.

We've been pointing to our fork. Unfortunately it doesn't seem these pull requests are looked at. We have a case where we are going to need the hostname support as well in the near future

emhagman avatar Nov 23 '21 16:11 emhagman

Unfortunately it doesn't seem these pull requests are looked at.

They do get looked at - this specific one is failing a check which would need to be resolved.

miketheman avatar Nov 23 '21 16:11 miketheman

Unfortunately it doesn't seem these pull requests are looked at.

They do get looked at - this specific one is failing a check which would need to be resolved.

A complexity check off by one...? OK, I can fix it. I appreciate your work, it just would have been nice to get an update or hint that we'd like to merge it

emhagman avatar Nov 23 '21 17:11 emhagman

Code Climate has analyzed commit 79ccf476 and detected 0 issues on this pull request.

View more on Code Climate.

qlty-cloud-legacy[bot] avatar Nov 23 '21 17:11 qlty-cloud-legacy[bot]

@miketheman should be all set now!

emhagman avatar Nov 23 '21 17:11 emhagman

@miketheman @emhagman how could I help to get this merged? Should I open a new PR fixing the conflict ?

mgaitan avatar Dec 29 '22 18:12 mgaitan

@miketheman Any chance of getting this merged, or @mgaitan's alternative #185?

djanowski avatar Mar 16 '23 19:03 djanowski

I'd just take https://github.com/miketheman/pytest-socket/pull/185 over this. Don't want to fix conflicts, this has been open forever. We've just been using our fork forever now.

emhagman avatar Mar 16 '23 21:03 emhagman