On Thu, Apr 25, 2019 at 7:06 PM Ullrich Hafner <ullrich.haf...@gmail.com> wrote: > Is someone already writing integration tests that use agents that are > provided by a docker container and has an example to share?
Various plugins use the `docker-fixtures` library for this. For example, with `DockerClassRule<JavaContainer>` it is straightforward to start a simple SSH agent in a container. Of course you can create a subclass with specialized tools installed in the image. This is the same library ATH uses, by the way. > Since my plugins interact with Git I want to create a Git Repository in the > test setup with fake data. Do we have a kind of API to fill a Git repository > (like GitRepo in ATH)? `GitSampleRepoRule` is available with a dep on the `tests` classifier of the `git` plugin. This is used widely in Pipeline-related plugins. It does not look like either this nor `TestGitRepo` are currently set up to handle remote repositories (in a Docker container) like `GitRepo.transferToDockerContainer` does, so that would be an obstacle if you had a single test which needed to run an agent in a container _and_ have that agent access a sample Git repository. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr3rxGh%2Btqc1W4%3Dzbo-jx%2BWoUWvOgpovr0C-VUoytBWhUA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.