purpleclay / testcontainers-imds Goto Github PK
View Code? Open in Web Editor NEWTestcontainers wrapper for the Instance Metadata Mock (imds-mock) tool. Quickly and easily simulate IMDS for localised testing
License: MIT License
Testcontainers wrapper for the Instance Metadata Mock (imds-mock) tool. Quickly and easily simulate IMDS for localised testing
License: MIT License
Switch to using the PurpleClay imds-mock rather than the existing Amazon EC2 Metadata Mock (AEMM).
Switch to using the PurpleClay imds-mock rather than the existing Amazon EC2 Metadata Mock (AEMM).
No response
By default, AEMM supports both IMDSv1 and IMDSv2. However, the best practice by AWS mandates the use of IMDSv2. Provide an option to start up the container with IMDSv2 only support
IMDSv2 can be enforced through the --imdsv2
flag when starting up the container.
No response
When the IMDS container is currently launched, the URLs for both the metadata and token endpoints are auto-generated but not exposed to any test code. Unfortunately, this makes testing a little cumbersome as the URL needs to be provided within tests.
Expose two methods on the container that returns a copy of the URLs, ensuring they remain immutable within the container itself. This will ensure all utility methods behave as expected.
No response
The AEMM container will always return a set of static values. To make these easier to assert against, these values should be exposed by the library as constants.
Define a list of paths and their respective values if querying the AEMM mock through any tests.
No response
Test code could be simplified further by not having to always handle the error that is returned by the underlying testcontainers-go
library.
Add additional methods MustContainer
and MustContainerWith
that will panic on any failures when launching the underlying container. This will remove the need to handle any errors within the test code, at the expense of a panic being raised.
No response
After the AEMM container is launched, any test code calling the container must hardcode the URL. Exposing this through the returned container would simplify testing.
The returned container should wrap the testcontainers.Container
interface, exposing an additional URL function.
type AEMMContainer struct {
testcontainers.Container
URL string
}
No response
The amazon-ec2-metadata-mock doesn't publish images with the latest tag. So there is a good change that this library will get out of sync with the latest version.
By adding a custom Dockerfile to this project and publishing it to the GHCR, a tool such as dependabot can be used to patch the version and raise a PR whenever a new version has been published.
If this PR is then auto-merged, a new container can be published automatically. Switch the reference image within the code to use the GHCR public image instead.
No response
Having switched to using the imds-mock tool. The testcontainers library should be updated to support the following features:
Expand the existing options and pass as required into the underlying image.
No response
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.