Skip to content

Re-enable http client unit tests, with local web-service #985

@murerfel

Description

@murerfel

In PR #949, commit 9bd7cf8 I disabled unit tests that depend on various external web-services to work. That step was necessary because CI failed too often because those services were unavailable.

However, these tests are valuable and we should find a way to run them on local resources. One idea e.g. for the httpbin service, is to run its docker image locally:

docker run -p 80:80 kennethreitz/httpbin

This could be achieved by using a crate like testcontainers that allows running docker containers from inside tests. So the idea is to run a httpbin service container instance for each of those tests (remember, cargo test runs parallel, so make sure they don't interfere) and then run the test http client against that local container instance.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions