@tharunya I don’t have further comments on MariaDB. I got MariaDB on docker running with OpenMRS SDK platform, but I don’t know how to set up the tests, that’s what I’ve been asking for some help.
I’m searching for the link to the tests setup on OpenMRS bamboo, I can’t seem to find the link. I ran some of these tests previously some weeks ago. But will like do some final tests before we can conclude. I’ve ran the OpenMRS v2.2 on my localhost which has mariaDB setup and I can’t find any problems so far.
This should basically just mean doing a standard maven build of openmrs-core, with an environment variable set to point to an external database (instead of the in-memory H2 one)
Per Lluis’s comment at Support for MariaDB: Looking for volunteers we may need to reapply a commit to be able to run context-sensitive tests during the regular OpenMRS build against an external DB based on an environment variable
probably the easiest way to get a clean mariadb/mysql is to use the docker tricks that Cintia and Mario worked out. You may also need to use the openmrs sdk to create the structure of the database
Awesome! I think we want to have separate plans for MySQL and MariaDB, since (1) the list of databases will hopefully grow with time and, more importantly, (2) when there’s a db-specific failure we want to be very clear which platform was affected. If @cintiadr has a different recommendation, then I would listen to her and ignore me.
First & foremost, we’d like to get to the point that we’re building/deploying openmrs-core (i.e., at least doing DB install scripts and ensuring they succeed) for both MySQL and MariaDB. That’s steps #1 and #2 above. I’m hoping/assuming our infrastructure is at a point where those builds can be farmed out to worker machines (not suck more cycles from the CI server). If we aren’t readily able to perform these builds on worker machine(s) – independent of CI – yet (@michael, @cintiadr, and/or @ryan should know the answer) and these plans are heavyweight (hopefully not, if we’re leveraging Docker containers), then we might have to compromise for the time being and run them on a schedule instead of after each commit. I’m hoping we can run the plans after each commit and, if not, we can get there very soon.
Please don’t hesitate to reach out for assistance if you need help or have questions. @dkayiwa has your back and we have lots of amazing people in the community that can help answer questions.
I have created two CI build plans for MySQL and MariaDB. They are both using the default h2 DB. I 'll need some assistance in configuring a MariaDB DB on OpenMRS CI and having the MySQL plan use the configured MySQL db on Bamboo.
I’m very very confused. Sorry for the delay, I’m particularly busy these
weeks.
I did create the MariaDB plan, it’s running mariadb and openmrs using the
SDK. https://ci.openmrs.org/browse/RELEASE-MDT
Both in docker. I’ve explained what I did in a comment before.
But it was still asking for some initial setup, I don’t know why. Someone
needs to take a look why, not sure if it’s some configuration missing.
From that, I need someone to setup the integration tests. It’s not the unit
tests, I suppose the unit tests don’t touch the database.
The unit tests are using an in-memory H2 database.
But if you want to have them use another database, you can use a couple of
system properties like in the example below:
I did not fix it, and I cannot even volunteer myself to fix it now, even if I had any knowledge of integration tests setup in openmrs.
I’m not entirely sure why unit tests would need to use a database, but maybe I understood it incorrectly. I was aiming to get integration/selenium tests running against the brand-new instance.
So, the build is starting openmrs and killing it after. So, every build is a new instance, and there’s no graphical mode on the agents. Even if they had, the build is cleaning up those instances.
There are quite a few options, for example, running the same docker containers locally (if using boot2docker in windows and mac, or simply docker in linux).
Other option is configure the build to do curl or wget on that page and grab any textual information you want.
@ch3ck, the idea is that you need to copy some of the stages that Cintia worked out here, which start up mariadb in a docker container, then run the tests, and then shut it down.
We don’t want to install mysql and mariadb on the bamboo agents for this, but rather use disposable docker containers for this.
@cintiadr, to address your confusion, we decided to first follow Lluis’s suggested plan (rather than mine) of switching things around so that the h2-backed integration tests that are part of the standard openmrs-core build are instead run against mariadb and mysql. These are JUnit tests, which is why people are referring to them as “unit tests” though this isn’t precise.
@cintiadr, I am having some issues properly setting up the OpenMRS docker image to run MySQL on docker. It’s like I’m not properly passing the system properties adequately. Could you help me out here?
@dkayiwa, How do I then pass the various tests, @burke recommends to Docker Image