{"id":16284995,"url":"https://github.com/goodforgod/arangodb-testcontainers","last_synced_at":"2025-03-20T02:31:28.852Z","repository":{"id":47140231,"uuid":"244463148","full_name":"GoodforGod/arangodb-testcontainers","owner":"GoodforGod","description":"⚙️ TestContainers ArangoDB module implementation.","archived":false,"fork":false,"pushed_at":"2023-08-13T08:35:49.000Z","size":222,"stargazers_count":12,"open_issues_count":1,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-10T19:22:30.900Z","etag":null,"topics":["arangodb","arangodb-container","arangodb-testcontainer","testcontainers","testcontainers-arango","testcontainers-arangodb"],"latest_commit_sha":null,"homepage":"https://testcontainers.com/modules/arangodb/","language":"Java","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/GoodforGod.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-02T20:00:44.000Z","updated_at":"2024-06-16T09:03:46.000Z","dependencies_parsed_at":"2024-10-10T19:21:59.307Z","dependency_job_id":"63bda85e-e39a-47e6-a420-59b489748004","html_url":"https://github.com/GoodforGod/arangodb-testcontainers","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoodforGod%2Farangodb-testcontainers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoodforGod%2Farangodb-testcontainers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoodforGod%2Farangodb-testcontainers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoodforGod%2Farangodb-testcontainers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GoodforGod","download_url":"https://codeload.github.com/GoodforGod/arangodb-testcontainers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221733785,"owners_count":16871961,"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":["arangodb","arangodb-container","arangodb-testcontainer","testcontainers","testcontainers-arango","testcontainers-arangodb"],"created_at":"2024-10-10T19:21:50.180Z","updated_at":"2024-10-27T21:10:40.750Z","avatar_url":"https://github.com/GoodforGod.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ArangoDB TestContainers\n\n[![Minimum required Java version](https://img.shields.io/badge/Java-8%2B-blue?logo=openjdk)](https://openjdk.org/projects/jdk8/)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.goodforgod/arangodb-testcontainer/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.goodforgod/arangodb-testcontainer)\n![Java CI](https://github.com/GoodforGod/arangodb-testcontainers/workflows/Publish%20Release/badge.svg)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=GoodforGod_arangodb-testcontainers\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=GoodforGod_arangodb-testcontainers)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=GoodforGod_arangodb-testcontainers\u0026metric=coverage)](https://sonarcloud.io/dashboard?id=GoodforGod_arangodb-testcontainers)\n[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=GoodforGod_arangodb-testcontainers\u0026metric=sqale_rating)](https://sonarcloud.io/dashboard?id=GoodforGod_arangodb-testcontainers)\n\nThis is [ArangoDB TestContainers](https://testcontainers.com/modules/arangodb/) module for running database as Docker container.\n\nFeatures:\n- ArangoDB [container](#container).\n- ArangoDB [cluster](#cluster).\n\n## Dependency :rocket:\n\n**Gradle**\n```groovy\ntestImplementation \"com.github.goodforgod:arangodb-testcontainer:3.0.1\"\n```\n\n**Maven**\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.goodforgod\u003c/groupId\u003e\n    \u003cartifactId\u003earangodb-testcontainer\u003c/artifactId\u003e\n    \u003cversion\u003e3.0.1\u003c/version\u003e\n    \u003cscope\u003etest\u003c/scope\u003e\n\u003c/dependency\u003e\n```\n\n## Usage\n\nCheck [this](https://www.testcontainers.org/test_framework_integration/junit_5/) TestContainers tutorials for **Jupiter / JUnit 5** examples.\n\nRun ArangoDB container *without* authentication.\n```java\n@Testcontainers\nclass ArangoContainerTests {\n\n    @Container\n    private static final ArangoContainer\u003c?\u003e container = new ArangoContainer\u003c\u003e(\"arangodb:3.11.2\")\n            .withoutAuth();\n\n    @Test\n    void checkContainerIsRunning() {\n        assertTrue(container.isRunning());\n    }\n}\n```\n\nRun ArangoDB Cluster *without* authentication.\n\n```java\n@Testcontainers\nclass ArangoContainerTests {\n\n    @Container\n    private static final ArangoCluster CLUSTER = ArangoCluster.builder(\"arangodb:3.11.2\")\n            .withoutAuth()\n            .build();\n\n    @Test\n    void checkContainerIsRunning() {\n        assertTrue(CLUSTER.getAgentLeader().isRunning());\n    }\n}\n```\n\n## Container\n\n### Up \u0026 Running\n\nContainer implements *startup strategy* and will be *available to TestContainer framework automatically* when database will be ready for accepting connections.\n\nCheck [here](https://www.testcontainers.org/features/startup_and_waits/) for more info about strategies.\n\n### Auth\n\nAll authentication options are available as per [ArangoDB Docker description](https://hub.docker.com/_/arangodb).\n\n*Without authentication or password or random password* configuration is **required** as per [docker image](https://hub.docker.com/_/arangodb).\n\n#### Without Authentication\n\nYou can run ArangoDB without authentication by specifying with setter.\n\n```java\n@Testcontainers\nclass ArangoContainerTests {\n\n    @Container\n    private static final ArangoContainer\u003c?\u003e container = new ArangoContainer\u003c\u003e()\n            .withoutAuth();\n\n    @Test\n    void checkContainerIsRunning() {\n        assertTrue(container.isRunning());\n    }\n}\n```\n\n#### With Password\n\nDatabase default user is *root*. You can specify desired password that will be assigned to *root* user.\n\n```java\n@Testcontainers\nclass ArangoContainerTests {\n\n    @Container\n    private static final ArangoContainer\u003c?\u003e container = new ArangoContainer\u003c\u003e()\n            .withPassword(\"mypass\");\n\n    @Test\n    void checkContainerIsRunning() {\n        assertTrue(container.isRunning());\n    }\n}\n```\n\n#### With Random Password\n\nYou can run container with random password for root user, \nbut is such case, there is no methods to retrieve that password.\nYou will have to retrieve it somehow by your own.\n\n```java\n@Testcontainers\nclass ArangoContainerTests {\n\n    @Container\n    private static final ArangoContainer\u003c?\u003e container = new ArangoContainer\u003c\u003e()\n            .withRandomPassword();\n\n    @Test\n    void checkContainerIsRunning() {\n        assertTrue(container.isRunning());\n    }\n}\n```\n\n## Cluster\n\nYou can run [ArangoDB cluster](https://www.arangodb.com/community-server/cluster/) as TestContainers.\n\nDefault cluster with 3 Agent nodes, 2 DBServer nodes and 2 Coordinator nodes is preconfigured for easy usage.\n\n```java\n@Testcontainers\nclass ArangoContainerTests {\n\n    @Container\n    private static final ArangoCluster CLUSTER = ArangoCluster.builder(\"arangodb:3.11.2\")\n            .withPassword(\"mypass\")\n            .build();\n\n    @Test\n    void checkContainerIsRunning() {\n        CLUSTER.getHost();\n        CLUSTER.getPort();\n        CLUSTER.getUser();\n        CLUSTER.getPassword();\n    }\n}\n```\n\n### Cluster Builder\n\nYou can build cluster with desired size via *ArangoClusterBuilder*.\n\nYou can check each container type via specified cluster container method.\n\n```java\nfinal ArangoCluster cluster = ArangoCluster.builder(\"arangodb:3.11.2\")\n            .withAgentNodes(3)              // 3 agent nodes by default\n            .withDatabaseNodes(2)           // 2 dbserver nodes by default\n            .withCoordinatorNodes(2)        // 2 coordinator nodes by default\n            .build();\n```\n\n## License\n\nThis project licensed under the MIT - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoodforgod%2Farangodb-testcontainers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoodforgod%2Farangodb-testcontainers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoodforgod%2Farangodb-testcontainers/lists"}