{"id":26584523,"url":"https://github.com/shaibujnr/integration_testing_with_test_cotainers_go","last_synced_at":"2026-04-15T08:38:45.323Z","repository":{"id":217877914,"uuid":"744251660","full_name":"Shaibujnr/integration_testing_with_test_cotainers_go","owner":"Shaibujnr","description":"Source code for the tutorial that demonstrates how to write integration tests for Golang applications using testcontainers.","archived":false,"fork":false,"pushed_at":"2024-01-30T10:27:00.000Z","size":18,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-18T19:31:46.740Z","etag":null,"topics":["docker","golang","integration-testing","redis","repository-pattern","testcontainers","testcoverage","tutorial-code"],"latest_commit_sha":null,"homepage":"https://volomn.com/blog/integration-testing-in-go-using-testcontainers","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Shaibujnr.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2024-01-16T23:09:19.000Z","updated_at":"2024-04-04T07:10:17.000Z","dependencies_parsed_at":"2024-01-18T17:08:19.870Z","dependency_job_id":null,"html_url":"https://github.com/Shaibujnr/integration_testing_with_test_cotainers_go","commit_stats":null,"previous_names":["shaibujnr/integration_testing_with_test_cotainers_go"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shaibujnr%2Fintegration_testing_with_test_cotainers_go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shaibujnr%2Fintegration_testing_with_test_cotainers_go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shaibujnr%2Fintegration_testing_with_test_cotainers_go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shaibujnr%2Fintegration_testing_with_test_cotainers_go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Shaibujnr","download_url":"https://codeload.github.com/Shaibujnr/integration_testing_with_test_cotainers_go/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245083946,"owners_count":20558243,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","golang","integration-testing","redis","repository-pattern","testcontainers","testcoverage","tutorial-code"],"created_at":"2025-03-23T09:35:32.353Z","updated_at":"2026-04-15T08:38:45.285Z","avatar_url":"https://github.com/Shaibujnr.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Integration Testing with Testcontainers :white_check_mark:\n\nThis project demonstrates how to perform integration testing using\ntest containers to spin up the infrastructure the application depends\non in docker containers and then tests your application against them.\n\n\n* The project implements a simple notes application that allows creating, updating and retrieving notes\n* The application uses a repository  to manage the storage and retrieval of the notes.\n* The repository uses postgres database as primary storage and redis for cache\n* The repository implements a `read-through` caching strategy. It first checks the cache (redis) for a note and\nif it can't find the note in the cache, it checks the primary storage (postgres). If it finds the note, it updates \nthe cache with the retrieved note before returning the note to the caller. Subsequent calls to retrieve the note\nwill use the cache and prevent hits to the postgres database.\n* Every write operation (update, delete) will invalidate the cache to ensure consistency.\n\n\n## Prerequisites \n1. Golang 1.23.1\n2. Docker version 24.0.6\n\nYou can learn more about the system requirements for test containers \nhere https://golang.testcontainers.org/system_requirements\n\n## Setup\n1. Clone this repository\n2. Run `go mod tidy`\n3. Run `go test -cover -v ./...`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaibujnr%2Fintegration_testing_with_test_cotainers_go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshaibujnr%2Fintegration_testing_with_test_cotainers_go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaibujnr%2Fintegration_testing_with_test_cotainers_go/lists"}