Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mock Drivers Refactor #155

Merged
merged 1 commit into from Oct 22, 2015
Merged

Mock Drivers Refactor #155

merged 1 commit into from Oct 22, 2015

Conversation

akutz
Copy link
Member

@akutz akutz commented Oct 22, 2015

This path refactors the mock (and bad mock) drivers formerly in the github.com/emccode/rexray/test package into the github.com/emccode/rexray/drivers/mock package. This is to support mock drivers during normal operations and not just automated tests.

The mock drivers are not automatically registered. To elect to use the mock drivers an environment variable of REXRAY_MOCKDRIVERS must be set to a value that evaluates to boolean true.

At this point it is possible to use mockOSDriver, mockVolumeDriver, and mockStorageDriver as values for the environment variables, config options, and CLI flags that control which drivers should be initialized. For example:

[0]akutz@pax:rexray$ env REXRAY_MOCKDRIVERS=true rexray volume --osDrivers=mockOSDriver --volumeDrivers=mockVolumeDriver --storageDrivers=mockStorageDriver
- name: test
  volumeid: test
  availabilityzone: test
  status: ""
  volumetype: ""
  iops: 0
  size: ""
  networkname: ""
  attachments: []

This path refactors the mock (and bad mock) drivers formerly in the
`github.com/emccode/rexray/test` package into the
`github.com/emccode/rexray/drivers/mock` package. This is to support
mock drivers during normal operations and not just automated tests.

The mock drivers are not automatically registered. To elect to use the
mock drivers an environment variable of `REXRAY_MOCKDRIVERS` must be
set to a value that evaluates to boolean true.

At this point it is possible to use `mockOSDriver`, `mockVolumeDriver`,
and `mockStorageDriver` as values for the environment variables, config
options, and CLI flags that control which drivers should be initialized.
@akutz akutz self-assigned this Oct 22, 2015
@akutz akutz added this to the 0.2.1 milestone Oct 22, 2015
akutz added a commit that referenced this pull request Oct 22, 2015
@akutz akutz merged commit ffa4e0e into rexray:master Oct 22, 2015
@akutz akutz deleted the feature/mock-drivers branch October 24, 2015 01:26
akutz added a commit to akutz/rexray that referenced this pull request Jul 24, 2017
Added admonition extension to mkdocs config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant