avast / avast/pytest-docker

Endpoint empty error

Open
#78 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
489
Forks
77
PR merge metrics
No merged PRs in 30d

Description

On a windows system, the endpoint command returns a weird string:

`0.0.0.0:9997\r\n`

That's why the `strip` [here](https://github.com/avast/pytest-docker/blob/master/src/pytest_docker/plugin.py#L79) does not change the string, and [this](https://github.com/avast/pytest-docker/blob/master/src/pytest_docker/plugin.py#L87) line takes the garbage part. I have solved it by using a regexp:

```
ips = re.findall(r'[0-9]+(?:\.[0-9]+){3}:[0-9]+', endpoint)
assert len(ips) == 1
endpoint = ips[0]
```

Do you think this is a possible solution that could be merged in?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in src/pytest_docker/plugin.py at lines 79 and 87, then reproduce the endpoint command behavior on Windows to inspect the trailing output. Ensure the endpoint parsing produces only the expected IP-and-port value, and verify the existing Docker-based integration tests still pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.