The integration tests are going to communicate with and modify a real OneView appliance.
The tests do their best cleanup after themselves, but know what they do before running them!
First, there's some setup you'll need to do. Do EITHER of the following:
-
Use environment variables to specify config file locations:
-
Copy the one_view_config.json.example and one_view_secrets.json.example files to a secure location outside this repo. When you do so, drop the
.example
part of the filename. -
Then set the following environment variables with the paths to the files you just created:
export ONEVIEWSDK_INTEGRATION_CONFIG='/path/to/one_view_config.json'
export ONEVIEWSDK_INTEGRATION_SECRETS='/path/to/one_view_secrets.json'
-
Use default config file locations
-
Copy the one_view_config.json.example and one_view_secrets.json.example files into the same directory (spec/integration) and drop the
.example
part of the filename on the new coppies. You should now have the following files:
spec/integration/one_view_config.json
spec/integration/one_view_secrets.json
These config files get loaded and create the following global variables:
$secrets
:$config
: Config for connecting to OneView appliance$client_120
: Client object pinned to API v120$client
: Client object using latest API version supported by the appliance
The following command must run in your Ruby SDK root directory:
Run $ rake -T
to show all the available rake tasks.
Then run any number of integration tests:
$ rake spec:integration
$ rake spec:integration:create
$ rake spec:integration:update
$ rake spec:integration:delete