Skip to content

Running the automated tests

Kelly McLaughlin edited this page Aug 27, 2012 · 6 revisions

Running The Automated Tests

The Riak CS Makefile has 3 targets to run automated tests. The targets are described below.

  • test - This is the standard test target and will run the eunit and unit-level eqc tests (if Quickcheck is installed and available). Running these tests does not require Riak, Riak CS, or stanchion to be running.
  • test-int - This runs the integration tests. For these tests to run properly a Riak node, a Riak CS node, and a stanchion node should be running.
  • test-client - This runs the client library tests to verify expected functionality of various S3 clients with Riak CS. As with the integration tests, a Riak node, a Riak CS node, and a stanchion node should be running.

The syntax for running one of the test targets is simply make <target-name>.

Additional test prerequisites

  • Prior to running the client or integration tests, ensure that anonymous user creation is enabled for Riak CS. To do this attach to the Riak CS console and enter application:set_env(riak_moss, anonymous_user_creation, true) or add {anonymous_user_creation, true} to the Riak CS app.config file and restart the Riak CS node.
  • There is a client test for the erlang S3 library, erlcloud. To successfully run this test, the machine running the test must be able to map all sub-domains of s3.amazonaws.com to the local machine. i.e. *.s3.amazonaws.com must resolve to the local host. One possibility is to set up a local DNS instance to handle this. Another option is to use a program such as dnsmasq and add the following line to the configuration: address=/s3.amazonaws.com/127.0.0.1
Clone this wiki locally