[Enhancement]: Add .NET MiniStack module

Aperta
#1,804 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

  • #1806 di @kharabasz — chiusa senza merge

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
24/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
csharp, docker

Direzione di ricerca

Read the existing module layouts and the Java MiniStack module linked in the issue, then review the proposed builder, container, configuration, connection string provider, and cleanup behavior. The issue author says they already have a working implementation with real-container tests and are waiting for approval to open a PR; a newcomer should check with the author before starting. Done means a .NET MiniStack module with the listed options, version methods, health check, and instance-scoped cleanup.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement module
Problem

MiniStack is a free, MIT-licensed AWS emulator that serves its AWS services on port 4566. It has a Java Testcontainers module (ministackorg/testcontainers-ministack), but there is no MiniStack module in this repo.

Solution

A Testcontainers.MiniStack module that follows the layout of the existing modules (MiniStackBuilder, MiniStackContainer, MiniStackConfiguration, a connection string provider):

  • new MiniStackBuilder("ministackorg/ministack:1.5.31"), port 4566, and a wait for HTTP 200 on /_ministack/health.
  • GetConnectionString(), plus GetRegion(), GetAccessKey() and GetSecretKey(), which return the configured values or MiniStack's defaults.
  • Builder options that match the Java module: WithRegion, WithCredentials, WithPersistence, WithImdsV2Required, and WithRealInfrastructure. The last one bind-mounts the Docker socket so MiniStack can run real RDS, ElastiCache, ECS and Lambda containers.
  • GetMiniStackVersion() returns the image tag. GetMiniStackVersionAsync() returns the version the server reports.
  • TestcontainersSettings.HubImageNamePrefix is passed through as MINISTACK_IMAGE_PREFIX, so nested images come from the same mirror.
  • On stop or dispose, the module removes the sibling containers that this MiniStack spawned in real-infrastructure mode. Ryuk doesn't know about them. Cleanup is scoped to the instance's ministack.instance label, so other MiniStack instances on the same daemon are left alone.
Benefit

.NET users get a MiniStack container that is ready to use, with no auth token, and feature parity with the Java module.

Alternatives

Build the container with ContainerBuilder, which leaves the port, wait strategy and environment variables to each user. I offered the module to the MiniStack maintainers first, but they aren't publishing a NuGet package for now (ministackorg/testcontainers-ministack#18), so this module would live here.

Would you like to help contributing this enhancement?

Yes. I have a working implementation with tests against real containers, and can open the PR once you're OK with adding the module.

Lingua principale
C#
Stelle
4.4k
Fork
366
Merge medio
2g 6h
PR unite (30g)
19

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di testcontainers/testcontainers-dotnet

Tutte le issue di testcontainers/testcontainers-dotnet

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.