-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run integration tests against Artifactory #6
Comments
I did some research on this today. The OSS container comes with a repository already created called So it turns out the Reported here: So I've been able to work around that case by using Also I'm thinking, for the purposes of wanting test collections to be in the repository already, having "populated data" would be ideal for most of it, otherwise I have to populate it at runtime, and since I don't want to commit tarballs, that also probably means committing actual collections and building them at runtime to upload... I could see cases where that's desirable and others where it isn't. So we'll see, but I suspect at some point it's going to become evident we need some persistent data that isn't going to be so easy to put in place at runtime. As far as that plan of how to build such an environment, I have an idea that I experimented with a little bit, that I think could work. The Artifactory container defines a So I came up with something that seems viable. First, I created a volume, and mounted it into the Artifactory container. Started it up, made the manual changes I needed, shut down the container. Then I mounted the same volume in a plain old alpine container, This gives me a runnable container that has a TAR of all the data I need. The idea is that I could push this image to this repository's registry as a data image. When wanting to run Artifactory for testing, the steps would roughly be in reverse:
This was tested and works, and I think all the steps can be automated nicely with docker compose, but I didn't try that part out yet because based on the above, I might not need this at all, we'll see. The way I envision the compose file working out is to use So there'd be two compose configurations: one for running the artifactory test environment and one for preparing the data image. The data prep config should do things in this order:
So we'd start this config (this has to be done interactively!), we admin configure whatever we need to in Artifactory through the web UI, when we're done, we shut it down. When the artifactory container is done, the archiver service starts and does the tar thing. Next step (could be another container with dependency, or a wrapping shell script, or manual) is to Now for running Artifactory as a test target, the steps are similar:
|
Test-only APIs that need a Pro license
Production-used APIs that need a Pro license
|
I started implementing the necessary stuff in pytest to launch an
artifactory-oss
container and get it set up so we can run integration tests against it.I was hamstrung in a number of ways, since jfrog makes a point to put basic features behind a paywall and require pro or enterprise licensing.
For one thing, we need to first address #5 since that is used in basically every API call.
But we have other issues too: it turns out the APIs to create a repository are also behind paid licenses... so we actually cannot programmatically set up our test environment with a free license. They expect you to manually connect to the web UI and click through to create it.
This is really demoralizing. I am trying to think through ways of creating a test image container or something, with the repository already set up. It's going to suck, because every time we want to change something, at least part of the process will have to be done manually.
I'm also worried that I'll keep uncovering more and more things as we go along that make it difficult or impossible to get a good test environment.
But I feel like I have to try because I don't like the current situation and the lack of tests.
The text was updated successfully, but these errors were encountered: