Test your Go code with Testcontainers

Sdílet
Vložit
  • čas přidán 19. 04. 2024
  • #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/
  • Věda a technologie

Komentáře • 16

  • @eldr-io
    @eldr-io  Před 15 dny +1

    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 Před 15 dny +2

    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

  • @afsdab
    @afsdab Před 15 dny +1

    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

  • @aldrickdev
    @aldrickdev Před 11 dny

    wow this is awesome!! thanks for sharing

  • @coffeeintocode
    @coffeeintocode Před 14 dny

    Great! Never seen this before so thanks a lot

  • @GoWithAndy-cp8tz
    @GoWithAndy-cp8tz Před 14 dny

    Thanks a lot. It was inspirational to me. Cheers ! I've already subscribed your channel.

  • @Nonsense116
    @Nonsense116 Před 13 dny

    I feel like this is a very complicated alternative to mocks, which are already an anti pattern.

  • @luizfernandopereira5120

    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 Před 15 dny

    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  Před 15 dny +3

      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 Před 14 dny +7

    Are we supposed to believe that's really you in the profile and thumbnails? lolll

    • @filiplaubert5001
      @filiplaubert5001 Před 14 dny +2

      It's an AI for sure :D, different chair in every thumbnail.

    • @avi7278
      @avi7278 Před 10 dny +1

      @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 Před 13 dny +3

    nice try fed you can't hide behind a coding girl persona on youtube!!!

  • @schwarzarbyter
    @schwarzarbyter Před 3 dny

    how pathetic