[openstack-dev] [vitrage] how to use mock driver

Rosensweig, Elisha (Nokia - IL) elisha.rosensweig at nokia.com
Mon Dec 12 12:43:27 UTC 2016


Hi,


·         In Vitrage Datasources, we can have a different input format for snapshots and updates. Thus, we need a different JSON file for each.

·         Also, as part of the Mock feature, we need to support (for each resource) things that will be static, such as it’s name, and things that change over time, such as timestamps. We support this partially via different JSON files. In general, the dynamic file (marked with “D”) overwrites the static one (marked with “S”).

·         In the code you can further inject specific fields you want to have for a specific test, in addition to the JSON files. See examples in test_scenario_evaluator.py.

Elisha

From: Yujun Zhang [mailto:zhangyujun+zte at gmail.com]
Sent: Monday, December 12, 2016 8:23 AM
To: OpenStack Development Mailing List (not for usage questions) <openstack-dev at lists.openstack.org>
Subject: [openstack-dev] [vitrage] how to use mock driver

Is there any documentation on how to use mock driver for unit testing?

It seems it generates fake events from json spec but what is the different between

- `xxx_snapshot_X.json` and `xxx_dynamic_X.json`
- `xxx_S` and `xxx_D`

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20161212/5cada3e1/attachment.html>


More information about the OpenStack-dev mailing list