Skip to content

Setting up unit tests for 4X

Mike Conway edited this page Apr 16, 2015 · 6 revisions

Set up iRODS 4X

Set up iRODS on a VM per iRODS (instructions)[http://irods.org/documentation/].

Configure iRODS rules in core.re

Set a default resource, here using the standard resource naming

acSetRescSchemeForCreate {msiSetDefaultResc("test1-resc","null"); }

Turn off the trash, you will otherwise fill up your vm

acTrashPolicy {msiNoTrashCan; }

Add vaults to map to testing resources.

The unit tests depend on multiple resources so it can test replication. I tend to set up two vaults in the iRODS directory. Here I've created Vault1 and Vault2

-bash-4.1$ pwd

/var/lib/irods/iRODS

-bash-4.1$ ls -la

total 48

drwxr-xr-x. 10 irods irods 4096 Apr 16 15:01 .

drwxr-xr-x. 7 irods irods 4096 Apr 16 14:14 ..

drwxr-xr-x. 3 irods irods 4096 Apr 16 12:42 clients

drwxr-xr-x. 2 irods irods 4096 Apr 16 14:14 config

drwxr-xr-x. 2 irods irods 4096 Apr 16 14:13 installLogs

-rwxr-xr-x. 1 irods irods 653 Aug 20 2014 irodsctl

-rw-r--r--. 1 irods irods 1693 Aug 20 2014 LICENSE

drwxr-xr-x. 4 irods irods 4096 Apr 16 12:42 scripts

drwxr-xr-x. 8 irods irods 4096 Apr 16 12:42 server

drwx------. 3 irods irods 4096 Apr 16 14:14 Vault

drwxrwxr-x. 2 irods irods 4096 Apr 16 15:01 Vault1

drwxrwxr-x. 2 irods irods 4096 Apr 16 15:01 Vault2

-bash-4.1$

Run the test setup scripts in jargon-core

Jargon has a test scripts subdirectory with a testsetup-consortium.sh file, as shown (here) [https://github.com/DICE-UNC/jargon/blob/master/jargon-core/test-scripts/testsetup-consortium.sh]

Note that the users and especially the resources need to be configured

Configure your settings.xml file in your local home directory

Configure settings.xml to map to the iRODS grid you just configured. This will be used by the maven pom.xml to generate a testing.properties file in your jargon test/resources directory on install.

A sample settings.xml file is available ((here)) [https://github.com/DICE-UNC/jargon/blob/master/jargon-core/test-scripts/sample-maven-settings.xml]

run maven

Run mvn install to update the testing.properties by pulling in the settings you put into settings.xml. You are now ready to run tests.