{"id":30686808,"url":"https://github.com/chriscodex/integrations-tests-mongodbatlas-go","last_synced_at":"2026-05-07T13:13:01.041Z","repository":{"id":44103533,"uuid":"511933608","full_name":"chriscodex/Integrations-Tests-MongoDBAtlas-Go","owner":"chriscodex","description":"This repository can help you to integrate a MongoDBAtlas cluster database into your Go application and test the operations of creating, reading, updating, and deleting documents from a collection.","archived":false,"fork":false,"pushed_at":"2022-09-03T09:08:43.000Z","size":19,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-01T13:05:04.867Z","etag":null,"topics":["database","mongo","mongodb","nosql"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chriscodex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-08T15:00:22.000Z","updated_at":"2022-11-26T15:41:42.000Z","dependencies_parsed_at":"2022-08-12T11:00:31.288Z","dependency_job_id":null,"html_url":"https://github.com/chriscodex/Integrations-Tests-MongoDBAtlas-Go","commit_stats":null,"previous_names":["chriscodex/crud-mongodbatlas-go"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/chriscodex/Integrations-Tests-MongoDBAtlas-Go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chriscodex%2FIntegrations-Tests-MongoDBAtlas-Go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chriscodex%2FIntegrations-Tests-MongoDBAtlas-Go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chriscodex%2FIntegrations-Tests-MongoDBAtlas-Go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chriscodex%2FIntegrations-Tests-MongoDBAtlas-Go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chriscodex","download_url":"https://codeload.github.com/chriscodex/Integrations-Tests-MongoDBAtlas-Go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chriscodex%2FIntegrations-Tests-MongoDBAtlas-Go/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273143127,"owners_count":25053122,"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","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["database","mongo","mongodb","nosql"],"created_at":"2025-09-01T23:09:11.387Z","updated_at":"2026-01-11T23:05:25.180Z","avatar_url":"https://github.com/chriscodex.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Integration Tests to MongoDBAtlas with Go ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/ChrisCodeX/CRUD-MongoDBAtlas-Go) ![](https://camo.githubusercontent.com/3084f133857f6d0a29d410e59ba39f6906b0f2e32b24082d1e95710196984db6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d4d6f6e676f44422d3444423333443f7374796c653d666c6174266c6f676f3d6d6f6e676f6462266c6f676f436f6c6f723d464646464646)\nThis repository can help you to integrate a MongoDBAtlas cluster database into your Go application and test the operations of creating, reading, updating, and deleting documents from a collection.  \n\n![ITMDBG](https://user-images.githubusercontent.com/106860308/178126005-e03589d7-08ea-4b38-8897-86ad38b85f19.png)\n\n---\n\n## **Table of Contents** 📖  \n1. [Pre-Requirements](#pre-requirements-)\n2. [Installation](#installation-)\n3. [Run Tests](#run-tests-%EF%B8%8F)\n\n---\n\n### Pre-Requirements 📋  \nHave access to a MongoDBAtlas cluster.  \nIn this link you have a guide on how to create it: https://www.mongodb.com/docs/atlas/tutorial/create-new-cluster/  \n\n---  \n\n### Installation 🔧  \n- Install the MongoDB driver as a dependency  \n```\ngo get go.mongodb.org/mongo-driver/mongo  \n```\n- Inside the database folder, modify the `mongodb.con.go` file. Add the uri of your cluster and the name of your database  \n```\nvar (\n\t// Add the uri of your cluster of MongoDBAtlas\n\t// https://www.mongodb.com/docs/drivers/go/current/quick-start/#connect-to-your-cluster\n\turi = \"\"\n\t// Add the name of your database\n\tdatabase = \"\"\n)\n```\n\n---\n\n### Run Tests ⚙️\nTo run the test, type this command:\n```\ngo test\n```\n- To verify the connection, run the test inside `/database` directory.\n- To test CRUD operations, run the test inside `/service/user.service` directory.  \nBy default it will create the \"users\" collection, if you want to change the collection, modify the `user.repository.go` file located inside `/repositories/user.repository/`  \n```\n// Name of collection\nvar collection = database.GetCollection(\"users\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchriscodex%2Fintegrations-tests-mongodbatlas-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchriscodex%2Fintegrations-tests-mongodbatlas-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchriscodex%2Fintegrations-tests-mongodbatlas-go/lists"}