malutki

A tiny HTTP testing server

MIT License

Stars
3
Committers
2

Malutki

A tiny HTTP server used to validate HTTP traffic in testing scenarios.

About

This HTTP server is meant to be used in integration, E2E and manual testing scenarios to validate HTTP traffic routing. The initial use case for malutki was in fact to be deployed to Kubernetes Pods in order to validate that an ingress controller was properly routing HTTP traffic to those Pods, and to test service mesh observability.

This server provides testing APIs that can be used to test certain kinds of HTTP responses, including a /status/{code} endpoint which simply returns the HTTP status it is provided. This can be helpful when your tests require a specific response or when you're testing tools that trace and observe HTTP traffic over a network (such as the observability features of a service mesh like Istio).

It is a core design goal of this project to ensure that the binary and container images for this tool are extremely small and portable. It is an eventual goal to build using TinyGo once the project supports net/http, so this tool intentionally uses minimal dependencies in preparation for that transition. Container images are built using distroless to minimize size.

Trivia: "malutki" means "tiny" in Polish.

Quickstart (with Kubernetes)

You can deploy Malutki on your Kubernetes cluster using the example from this repository:

$ kubectl apply -f examples/deployment-with-loadbalancer-service.yaml

This will create a Kubernetes Deployment which will be exposed outside of the cluster via a LoadBalancer type Service.

Usage

This testing server is broken up into different APIs which provide various testing capabilities.

/status/{code} API

This is a basic API that is used to return the HTTP Status Code that you send it back to you. This is helpful if you're testing the machinery that provisions the server and just want a simple "it's working" response, e.g.:

$ curl -w '%{http_code}\n' ${MALUTKI_ADDR}/status/201
201

Only 2XX, 4XX and 5XX status codes are currently supported.

Contributing

Contributions are welcome! Please feel free to create issues, discussions and pull requests.

Package Rankings
Top 8.32% on Proxy.golang.org