Fantastic idea, I often missed the ability to just start tests for Gremlin.Net from my IDE.
Luckily for us, there is a project that is aimed exactly at problems like this: https://www.testcontainers.org/ The basic idea of Testcontainers is that you define a Docker container in your tests for whatever external dependencies you need. Databases are a frequent example where Testcontainers makes sense. For us, Gremlin Server would be such a container. Testcontainers then uses the ability of the testing framework (e.g. JUnit) to start the Docker container for the tests and waits until they are fully started (how they are started can be configured for each container differently). After the tests have completed, it also stops the containers again. That way, you don't have to manage the containers manually anymore. Everything is done in the background by the IDE / the build tool. Testcontainers was originally a Java library, but they now also have libraries for different languages, including the ones for which we have GLVs: testcontainers-python: https://github.com/testcontainers/testcontainers-python testcontainers-dotnet: https://github.com/testcontainers/testcontainers-dotnet testcontainers-node: https://github.com/testcontainers/testcontainers-node Testcontainers-java is the most advanced library of these of course. The others still lack some functionality, but I guess that we could also just contribute to those libraries if an important feature is missing for us. I wanted to use Testcontainers for Gremlin.Net, but testcontainers-dotnet unfortunately can only use images that are available in some registry. So, we would have to push a Docker Image of Gremlin Server to DockerHub to use it in our tests. That means that we could either only test the GLVs against already released versions or we could publish something like nightly build images of Gremlin Server. I originally wanted to wait until testcontainers-dotnet is able to use images that are only available locally (testcontainers-java already has that capability), but now that I think more about this, I think that it makes actually more sense to use images that are available in the registry as every developer would otherwise have to build test images first locally in order to use them for tests. So, I suggest that you guys take a look at Testcontainers to see whether you agree that it's a good solution to our problem and then we can see whether we want to publish nightly builds for the GLV tests or how we want to handle that. -----Ursprüngliche Nachricht----- Von: Stephen Mallette <[email protected]> Gesendet: Dienstag, 26. Februar 2019 22:24 An: [email protected] Betreff: docker and GLV development Anyone have any idea how to make it so that docker can be useful for helping to streamline GLV development? I'd love to be able to do something like: docker/gremlin-server.sh -test which would start Gremlin Server with our standard test configuration (currently built into the maven tool chain, but I think that could be extracted without too much difficulty). That way, we could easily open up whatever GLV specific IDE we wanted and run tests directly in there, use the debugger, etc. Sound useful? and if so, is that something that is easy/possible? and then further....any volunteers with the know-how to get that setup (i'm happy to assist however i can)? btw, if you have a nicer way to set up an environment for GLV development and docker is a waste of time, please clue me in. i don't mind using the maven integration but i feel like i could be more efficient with a more streamlined setup.
