The osg-test package contains software that performs automated, functional integration tests an OSG Software installation.
WARNING: The tests and associated test framework run as root and may destroy your system! It is strongly recommended that osg-test be run only on “disposable” systems — ones that can be reimaged or reinstalled from scratch with little effort. Virtual machines are ideal for this kind of test.
Bootstrap the test system using the osg-testing Yum repository. The osg release is required as the first argument and takes the form of '<major version>.<minor version>' e.g. 3.2. To get osg-test from the osg-development Yum repository, replace the second argument with development; to get osg-test from the production repository, omit the second argument. This step makes sure that both the EPEL and OSG repositories are available, then installs and verifies the osg-test package itself.
$ ./bootstrap-osg-test <osg release> testing
Run the tests (see below for options). Be sure to direct the stdout/stderr to a file to get all the information from the test run (the dump-file option only outputs some of the output to a file):
Fundamentally, the osg-test script runs tests and reports on their results. However, the script can also perform many of the housekeeping tasks associated with setting up and tearing down the test environment, including adding (and later removing) a test user and its X.509 certificate, installing (and later removing) one or more RPMs, and so on. The following options are available:
Add and configure the test user account (see also -u below). By default, the script assumes that the test user account already exists and is configured with a valid X.509 certificate in its .globus directory.
Generate CILogon-like certificates
-c, --config FILE
Configuration file to use that specifies command-line options. See below for syntax
After all test output, print all commands and their output from the test run. Typically generates a lot of output.
--df, --dump-file FILE
Like --dump-output, but prints the output to a file instead of the console
Speeds up osg-test in the case where it is run by hand. May not be suitable when running multiple instances of osg-test at once.
-g, --update-repo REPO
Enable the given repository when using yum to update packages. Use actual repo names, such as osg-testing and osg-development.
-i, --install PACKAGE
Before running tests, use yum to install the given package; may be specified more than once to install more than one top-level package. By default, the script assumes that the user has installed all packages to be tested in advance.
Do not run clean-up steps. Opposite of --cleanup
-p, --password PASSWORD
Password for the grid certificate of the test user. Defaults to the password that works with the X.509 certificate for the default test user.
-r, --extra-repo REPO
Enable the given extra repository (in addition to production) when using yum to install packages. Use actual repo names, such as osg-testing and osg-development. Can be used multiple times with different repositories.
OSG release version (e.g. 3.2) to use when updating packages specified with -i.
Test client tarballs instead of RPM-based installation.
The location of the tarball test files (if non-standard).
Skip running the tests themselves. Useful for running/testing just the set-up and/or clean-up steps.
-u, --test-user USERNAME
Use the test user account with the given name. See also the -a and -p options.
Print the name of each test as it is run; generally a good idea.
Print usage information and exit.
Print the script version and exit.
Config File Syntax
Unfortunately, the names of the variables in the config file are not the same as their names on the command line. Below is a translation table and an example config file.