What if we could easily spin up containers for services that our tests depend on?
Read more here:
https://www.devleader.ca/2024/03/27/c-testcontainers-for-mongodb-how-to-easily-run-local-databases/
What if we could easily spin up containers for services that our tests depend on?
Read more here:
https://www.devleader.ca/2024/03/27/c-testcontainers-for-mongodb-how-to-easily-run-local-databases/
Как перестать писать WHERE tenant_id и отдать безопасность базе (PostgreSQL RLS в Go)?
В одном из прошлых проектов случился «кошмар техлида»: в суматохе хотфикса было забыто добавление фильтра WHERE tenant_id = ? в одну из ручек API. В итоге один клиент увидел отчеты другого. Все быстро откатили, но я навсегда запомнил то холодное чувство в животе. Когда начали проектировать архитектуру следующего проекта, я понял, что полагаться на внимательность разработчиков на код-ревью - это тупик. Рано или поздно кто-то устанет, ошибется, и данные снова протекут. Искал способ гарантировать изоляцию данных так, чтобы ее физически нельзя было забыть. Почему стандартные решения не подошли? Перебрал классическую тройку вариантов, и у каждого нашлись фатальные минусы для задачи: 1. Логическая изоляция (WHERE в коде)? Как это работает: Тысячи строк кода, и в каждом запросе ты обязан помнить про tenant_id . Проблема: Человеческий фактор. Это бомба замедленного действия. 2. Схема на клиента (Schema-per-tenant) Как это работает: У каждого клиента своя схема ( schema_01 , schema_02 ...). Проблема: Это работает, пока клиентов 100. Когда их становится 10 000, база начинает задыхаться. Детали: Проблема даже не в миграциях, а в файловой системе. 10 000 клиентов × 50 таблиц = 500 000 файлов. Postgres (и Linux) сходят с ума от такого количества открытых дескрипторов, а VACUUM превращается в ад. 3. Отдельная БД на клиента Как это работает: Полная физическая изоляция. Проблема: Ценник на инфраструктуру. Держать тысячи коннектов или инстансов RDS - экономическое самоубийство для стартапа. Тогда посмотрел в сторону PostgreSQL Row Level Security (RLS) . Честно говоря, поначалу было страшно. Отдавать логику безопасности "черному ящику" внутри БД казалось рискованным. Плюс, все вокруг пугали: "RLS убьет производительность".
https://habr.com/ru/articles/987364/
#Golang #PostgreSQL #RLS #Multitenancy #Backend #Testcontainers #Database_Security #Архитектура
Внедряем Testcontainers за два дня или как перестать бояться рефакторинга и начать доверять своим тестам
Надоело, когда после сотни зеленых unit-тестов приложение падает на тестовом стенде? Когда рефакторинг превращается в кошмар из-за необходимости переписывать полсотни тестовых классов? Мне тоже надоело и я нашел решение. В статье покажу, как за два-три рабочих дня внедрить Testcontainers и начать писать тесты, которые действительно работают. В докладе вы найдете production-ready решение с PostgreSQL, Kafka и WireMock, которое выявит реальные проблемы еще до деплоя, честное тестирование реального поведения приложения.
Permission-Aware RAG: End-to-End Testing with the SpiceDB Testcontainer
#Docker #Community #Partnerships #AIAgent #LLM #Testcontainers
https://www.docker.com/blog/rag-permission-testing-testcontainers-spicedb/
The docling-testcontainers module provides a ready-to-use Testcontainers integration for running a Docling Serve instance, wrapping the official container image and exposing a simple Java API.
https://testcontainers.com/modules/docling/
Hat mich paar Brainloops gekostet, aber habe es am Ende hinbekommen. DIND mit #forgejoaction klappt jetzt. Somit laufen auch meine #testcontainers Test auf #codeberg und ich kann weiter von #github migrieren.
Beispiel Action Run: https://codeberg.org/sparsick/hero-frontend-backend-monorepo/actions/runs/41/jobs/0/attempt/2
Code für den Forgejo Runner Setup:
Testcontainers: The past, the present and the future
Путевые заметки о знакомстве со Spring Data R2DBC
Привет, Хабр! Меня зовут Каненков Александр, я backend-разработчик в Домклик. Не так давно я резко и с головой погрузился в мир реактивного программирования и очень заинтересовался этой темой. Хочу поделиться кратким введением в Spring Data R2DBC, зачем это нужно, как начать использовать и какие преимущества даёт. Мы разработаем небольшое приложение, добавим flyway и напишем пару тестов.
Too many #Spring contexts, Docker containers, and threads? Sergei Chernov explains how context caching really works—and how bad defaults lead to OOMs and flaky tests.
Learn how to control resource usage: https://javapro.io/2025/12/17/optimizing-spring-integration-tests-at-scale/
I've forked JBake, ported to Kotlin, upgraded all deps, added support for Texy!, replaced the backend database, and about to release it to Maven Central within days. Also it's now buildable with Maven, and has E2E tests.
https://github.com/OndraZizka/jbake
#jbake #texy #markdown #freemarker #asciidoc #asciidoctorj #orientdb #neo4j #hsqldb #textile #groovy-templates #gradle #maven #fork #java #kotlin #jade #pug #thymeleaf #testcontainers #static #site #generator #staticsitegenerator
I never expected such an amazing journey when I started working on #testcontainers for #dotnet years ago. I've met many great people and learned a lot. I'm truly grateful for all of it. I never imagined the packages would one day pass 150M+ downloads!
Check out Testcontainers (https://testcontainers.com/) and test against real dependencies with confidence.
Realistic test environments often turn into complex beasts. The TCI framework adds structure and control on top of #Testcontainers—without sacrificing flexibility.
Alexander Bierler explains how.
Read #JAVAPRO now:https://javapro.io/2025/10/10/supercruising-with-testcontainers-making-tests-faster-and-more-flexible/
#CI #DevOps #Java #Frameworks #OpenSource
A new #testcontainers for #dotnet release is available. This release supports .NET 10 and ensures compatibility with Docker Engine v29: https://github.com/testcontainers/testcontainers-dotnet/releases/tag/4.9.0. I'm working on updating Docker.DotNet for full v29 support, so expect a new version soon /cc @docker.
Check out the new available modules like Playwright, Grafana, or my favorite this release, Toxiproxy. It's a really interesting tool for pushing testing further: https://dotnet.testcontainers.org/modules/toxiproxy/.
Good day folks. How many of you are still battling to repair issues related to testcontainers, java-docker and the Docker 29 release?
If you're updating to #docker engine v29 and using Docker.DotNet, make sure to pin the API version to 1.44 (or similar). v29 breaks the library. More details here: https://github.com/moby/moby/releases/tag/docker-v29.0.0.
I'm working on making Docker.DotNet compatible with v29. An updated version of #testcontainers for #dotnet will be available soon.
A few self-hosters have laughed about the Azure and AWS outages. I think a few of them are now dealing with some outages for tools because #Docker 29.0.0 increased the minimum API version from 1.24 to 1.44, which caused some tools like #Traefik to fail. Their GitHub issue page got quickly flooded with issues. The good thing, people also shared workarounds to get them quickly back on track. I felt sorry for the stress they got in the last days. The Traefik maintainers managed to fix it pretty quickly and shipped 3.6.1, and all is good again.
The question would be, why haven't they seen that one coming? Wasn't it clearly communicated from #Docker, or haven't paid #Traefik maintainers paid enough attention?
The fall-out of that change is quite interesting. It will affect a lot of dependencies like #testcontainers, which have shipped 2.0.2, being compatible with Docker 29.0.0. Seems like some maintainers have some work to do, wish them well.
An important note in the #docker 29.0 release notes is the deprecation of older API versions. Previously Docker was supporting clients going all the way back to v1.12.0 released in 2016. The engine now defaults to requiring v25.0 clients released on 2024-01-19.
Tools that mount the docker socket may need upgrades or workarounds. Breakages have been seen with #watchtower, #portainer, #traefik, and #testcontainers.
https://dotnet.testcontainers.org/test_frameworks/xunit_net/ - #TestContainers for #dotNET allows spinning up #Docker #containers in the middle of #xUnit #tests.
https://node.testcontainers.org/quickstart/usage/ - #TestContainers for #Node allows quickly spinning up #containers in the middle of anything like #Tests. I didn't realize there was more to the docs than the blank first page.
Aaaand #Testcontainers joins the club of libraries removing methods in major versions without a deprecation period in advanced. Thanks for nothing.