Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For each test, we spin up a Fastify server with the endpoint that we expect to get called. If needed, the request body is checked, and the response is returned similar to a real Kubernetes API server. We then assert that the function under test behaved as expected. There appears to be no way to perform these tests without a real HTTP server since `@kubernetes/client-node` doesn't seem to let us mock their HTTP client, but this may actually be a benefit, since we're dealing with the production code and not some mocked object.
- Loading branch information