Skip to content

Go tests use a deprecated package and require manual test server configuration #3149

@frumioj

Description

@frumioj

In (for example) libs/go/sia/aws/meta, the test servers use https://github.com/dimfeld/httptreemux which is no longer maintained. The way the testServer is currently written, the TCP listener must be started with a manual call to net.Listen which doesn't easily work in all scenarios (such as particular proxy environments, or where an HTTP server may already be running on a particular port).

A better way would be to use the https://pkg.go.dev/net/http/httptest package and http handlers, all from the golang std packages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions