<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Testcontainers on Daniel Genezini</title><link>https://genezini.com/tags/testcontainers/</link><description>Recent content in Testcontainers on Daniel Genezini</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><copyright>2022 Daniel Genezini All rights reserved</copyright><lastBuildDate>Mon, 31 Jul 2023 20:00:00 -0300</lastBuildDate><atom:link href="https://genezini.com/tags/testcontainers/index.xml" rel="self" type="application/rss+xml"/><item><title>Integration tests with AWS S3 buckets using Localstack and Testcontainers</title><link>https://genezini.com/blog/p/integration-tests-with-aws-s3-buckets-using-localstack-and-testcontainers/</link><pubDate>Mon, 31 Jul 2023 20:00:00 -0300</pubDate><guid>https://genezini.com/blog/p/integration-tests-with-aws-s3-buckets-using-localstack-and-testcontainers/</guid><description>&lt;img src="https://genezini.com/blog/p/integration-tests-with-aws-s3-buckets-using-localstack-and-testcontainers/cover.jpg" alt="Featured image of post Integration tests with AWS S3 buckets using Localstack and Testcontainers" /> As I explained previously in this article, in integration tests, we should mock unmanaged dependencies (dependencies that are external to our system and not controlled by us, like APIs) but test against real managed dependencies (dependencies that are controlled by our system, like databases, queues, etc). This improves the reliability of the integration tests because the communication with these dependencies are a complex part of the system and can break with a package update, a database update or a change in a queue message format.
In this post, I'll show how to use Localstack and Testcontainers to emulate an AWS environment for use in integration tests.</description></item><item><title>How to run scripts on SQL Server container startup</title><link>https://genezini.com/blog/p/how-to-run-scripts-on-sql-server-container-startup/</link><pubDate>Mon, 15 May 2023 06:00:00 -0300</pubDate><guid>https://genezini.com/blog/p/how-to-run-scripts-on-sql-server-container-startup/</guid><description>&lt;img src="https://genezini.com/blog/p/how-to-run-scripts-on-sql-server-container-startup/cover.jpg" alt="Featured image of post How to run scripts on SQL Server container startup" /> Unlike MySQL and PostgreSQL, which execute scripts in the /docker-entrypoint-initdb.d/ directory after initialization, the SQL Server container image doesn't provide a built-in mechanism for running scripts at startup.
In this post, I'll show how to create a custom container image that waits for SQL Server startup and runs a pre-configured script. In addition, I'll show how to use this custom image to run SQL Server in Testcontainers.</description></item><item><title>How to run disposable databases for your tests. Improve your integration tests accuracy with Testcontainers</title><link>https://genezini.com/blog/p/how-to-run-disposable-databases-for-your-tests.-improve-your-integration-tests-accuracy-with-testcontainers/</link><pubDate>Mon, 09 Jan 2023 07:00:00 -0300</pubDate><guid>https://genezini.com/blog/p/how-to-run-disposable-databases-for-your-tests.-improve-your-integration-tests-accuracy-with-testcontainers/</guid><description>&lt;img src="https://genezini.com/blog/p/how-to-run-disposable-databases-for-your-tests.-improve-your-integration-tests-accuracy-with-testcontainers/cover.jpg" alt="Featured image of post How to run disposable databases for your tests. Improve your integration tests accuracy with Testcontainers" /> Integration tests are essential to ensure that the different components of our system work together as expected and continue to work after changes.
In this post, I'll explain how to spin up disposable database containers to use in integration tests.</description></item></channel></rss>