Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The agent simulator and marvin are integrated into build steps to help a developer ensure that some simple tests pass before making a commit. The developer environment needs to have Marvin installed and the marvin-nose plugin registered for the integration-test to work: These tests are lightweight and should ensure that your checkin doesn't break critical functionality for others working with branch: master.

To run the basic tests. Your build steps should be as follows

Building

Code Block
$ mvn -Pdeveloper -Dsimulator clean install 

Deploy database

Code Block
$ mvn -Pdeveloper -pl developer -Ddeploydb
$ mvn -Pdeveloper -pl developer -Ddeploydb-simulator

...

Alternatively one can install/upgrade marvin using the sync mechanism.(

Sync latest APIs

...

Sometimes you want to synchronize marvin with the new APIs that you have introduced locally or any alterations you may have made the to an existing API. In such cases you can sync marvin's libraries as follows. 

Code Block
$ sudo mvn -Pdeveloper,marvin.sync -Dendpoint=localhost -pl :cloud-marvin

This needs sudo privileges since it will call on pip to upgrade the existing marvin installation on your machine. The endpoint is where your management server is running and is exposing the API discovery plugin. A listApis call is made and the resulting json deserialized back into marvin's library entities.

Run the integration test

In a separate session you can use the following commands to bring up an advanced zone with two simulator hypervisors and followed by run tests that are 'tagged' to run on the simulator:

Code Block
$ mvn -Pdeveloper,marvin.setup -Dmarvin.config=setup/dev/advanced.cfg -pl :cloud-marvin integration-test #Setup environment
$ mvn -Pdeveloper,marvin.test -Dmarvin.config=setup/dev/advanced.cfg -pl :cloud-marvin integration-test  #Run checkin tests

Instructions on how to roll your own tests into the checkin tests can be found here

Building Specific Versions of CloudStack

...