Skip to content

feat: unit testing #801

@JosiahParry

Description

@JosiahParry

What is the problem your feature solves, or the need it fulfills?

Right now there is no clear way to unit test anything with the ProxyHttp trait implemented with out running the server live and hand crafting curl requests or similar.

Describe the solution you'd like

I would like to have a way to have mocked Session / server that can be run with #[tokio::test] we we can send a mocked request to the struct that implements ProxyHttp, capture the response, and the inspect the result—e.g. make sure that the headers are assigned correctly, expect a redirect, etc.

Describe alternatives you've considered

Create infrastructure that spins up the server, then sends requests with another language or tool. Then capture those. These are not strongly types and are less likely to catch any issues at compile time

Metadata

Metadata

Assignees

No one assigned

    Labels

    ergonomicsEase of use, developer friendlinessquestionFurther information is requestedstale

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions