[openstack-dev] [qa] [api] [all] use gabbi and tempest with just YAML
Chris Dent
cdent+os at anticdent.org
Thu Jan 4 13:17:57 UTC 2018
(this is a request for assistance and verification)
Back in July[1] I wrote about some experiments with using gabbi[2]
with tempest. In that message I said:
At some point it may be interesting to explore the option of
"put a gabbit in dir X" and tempest will run it for you.
I've finally started working on that, and have a pull request to
gabbi-tempest[3] with a WIP that allows you to do this:
GABBI_TEMPEST_PATH=/path/one:/path/two tempest run --regex gabbi
Within /path/one and /path/two (or whatever, or however many, paths
you want) are yaml files containg tests in the gabbi format. If the
env variable is not set a 'gabbits' directory in the current working
dir is checked.
This makes it possible for projects to make purely api-driven (and
"clientless"[4]) integration tests by requiring the gabbi-tempest
plugin and writing some YAML.
The gabbi-tempest plugin is responsible for getting authentication
and service catalog information (using standard tempest calls) from
keystone and creating a suite of environment variables (such as
PLACEMENT_SERVICE and COMPUTE_BASE).
I have a sample file[5] that confirms resource provider and
allocation handling across the process of booting a single server.
It demonstrates some of the potential. Don't be too scared by the
noisy YAML anchors at the top, that's just an experiment to see what
can be done to manage URLs without having to know URLs.
I'm pretty sure this can be useful for integration tests, cloud
verification, and interop validation, but I'm suspiciously biased in
favor of gabbi from years of positive use, so would like some
additional input and feedback.
Gabbi is already very valuable for functional tests. When
integrating with tempest it gets the discovery power that tempest
provides and things like FLAVOR_REF, both useful in integration or
real cloud scenarios.
Thanks for your attention.
[1] http://lists.openstack.org/pipermail/openstack-dev/2017-July/120369.html
[2] https://gabbi.readthedocs.org/
[3] https://github.com/cdent/gabbi-tempest/pull/2
[4] A bad term, in much the same way serverless is. Of course there
is a client, but in this case the client is gabbi making raw http
requests rather than a library which might impose its own
expectations and obfuscations on the interactions.
[5] https://github.com/cdent/gabbi-tempest/blob/d570f5da52ba80b6d4b75b18e10897c49e9b6aed/samples/multi.yaml
--
Chris Dent (⊙_⊙') https://anticdent.org/
freenode: cdent tw: @anticdent
More information about the OpenStack-dev
mailing list