Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add tests that transform vendored API responses (fixtures) into vendored
/metrics output (snapshots), so that we can see how changes to the
exporter implementation affect the actual output of the exporter, in the
form of changes to the snapshots.
I've sourced the fixtures from debug JSON logging of real API responses
from tasks running in AWS. Each task consisted of an ecs_exporter
container and a prometheus container.
My expectation is that fixtures should not be updated unless we become
informed that API responses have materially changed, e.g. because new
features we are using were added, or breaking changes have been made.
I've got two sets of fixtures and snapshots, one for EC2 and one for
Fargate. The API responses differ between EC2 and Fargate
enough (because, among other things, they use two completely different
implementations of the task metadata API, and two different container
runtimes entirely!) that I think it's worth covering them both
independently.
Closes #99.