Test your Go code with Testcontainers

  Рет қаралды 3,033

eldr-io

eldr-io

15 күн бұрын

#coding #golang #programming #testing #tutorial #testcontainers #mysql
In this video we will be looking at one of my favourite integration test virtualisation frameworks: testcontainers - and how to use it with Go. We programmatically spin up a MySQL database and configure it, all within Golang tests and connect a simple example MySQL database client to it.
Testcontainers is an open source framework for providing throwaway, lightweight instances of databases, message brokers, web browsers, or just about anything that can run in a Docker container.
testcontainers.com/

Пікірлер: 16
@eldr-io
@eldr-io 13 күн бұрын
The repo for the code in this tutorial is here: github.com/sigrdrifa/testcontainers-go And the editor I use is Neovide (neovim), the config is here: github.com/sigrdrifa/nvim thanks for watching!
@user-hi3dj6wh7d
@user-hi3dj6wh7d 13 күн бұрын
you save my time. been thinking abt this since a day. thanks a lot. looking forward for more such videos to test for kafka messaging and AWS based testing too for Go
@aldrickdev
@aldrickdev 9 күн бұрын
wow this is awesome!! thanks for sharing
@afsdab
@afsdab 13 күн бұрын
Great video, I saw this tool in another blog posting and I have no idea what this tool does even after seeing the site hahah. Thanks for clarifying
@coffeeintocode
@coffeeintocode 13 күн бұрын
Great! Never seen this before so thanks a lot
@Nonsense116
@Nonsense116 11 күн бұрын
I feel like this is a very complicated alternative to mocks, which are already an anti pattern.
@GoWithAndy-cp8tz
@GoWithAndy-cp8tz 12 күн бұрын
Thanks a lot. It was inspirational to me. Cheers ! I've already subscribed your channel.
@luizfernandopereira5120
@luizfernandopereira5120 12 күн бұрын
Even though its simplifies the spin up of depencency services in containers still a requirement to have docker runner to do it, so we are replacing a docker-compose.test like file with something that can be programatically created for each scenario. Sounds a great solution but I dont know exactaly how it would behave into a Ci/CD pipeline, if all of this containers would allocate a lot fo memory or space or even not shut down correctly causing currency problems.
@user-hi3dj6wh7d
@user-hi3dj6wh7d 13 күн бұрын
may i know the editor you are using? also can i request for the github repo or gist of the codeyou have done in this video?
@eldr-io
@eldr-io 13 күн бұрын
The repo for the code in this tutorial is here: github.com/sigrdrifa/testcontainers-go And the editor I use is Neovide (neovim), the config is here: github.com/sigrdrifa/nvim
@avi7278
@avi7278 12 күн бұрын
Are we supposed to believe that's really you in the profile and thumbnails? lolll
@filiplaubert5001
@filiplaubert5001 12 күн бұрын
It's an AI for sure :D, different chair in every thumbnail.
@avi7278
@avi7278 8 күн бұрын
@silaspy-ff2ne it's obviously not even a girl, it's some dude using a voice changer and AI tatas for clicks. weird. enjoy, if that's your kinda thing.
@NeverTrust298
@NeverTrust298 12 күн бұрын
nice try fed you can't hide behind a coding girl persona on youtube!!!
@schwarzarbyter
@schwarzarbyter 2 күн бұрын
how pathetic
Mock Web APIs with Testcontainers in Go
20:17
eldr-io
Рет қаралды 1,5 М.
АВДА КЕДАВРАААААА😂
00:11
Romanov BY
Рет қаралды 8 МЛН
McDonald’s MCNUGGET PURSE?! #shorts
00:11
Lauren Godwin
Рет қаралды 25 МЛН
КИРПИЧ ОБ ГОЛОВУ #shorts
00:24
Паша Осадчий
Рет қаралды 4,7 МЛН
PyTest • REST API Integration Testing with Python
37:24
pixegami
Рет қаралды 68 М.
Understanding an OPEN source codebase LIVE
29:40
Harkirat Singh
Рет қаралды 58 М.
Bash Scripting on Linux (The Complete Guide) Class 02 - Hello World
17:24
This Will Make Everyone Understand Golang Interfaces
21:03
Anthony GG
Рет қаралды 37 М.
React Testing for Beginners: Start Here!
1:17:14
Programming with Mosh
Рет қаралды 49 М.
MOST Popular Go Framework: Gin (and why you should NOT use it)
17:01
The standard library now has all you need for advanced routing in Go.
13:52
CONCURRENCY IS AN ILLUSION?
16:59
Core Dumped
Рет қаралды 66 М.
Java Unit Testing with JUnit - Tutorial - How to Create And Use Unit Tests
21:35
How to create your Golang APIs from now on with v1.22
12:51