Fwd: Regarding RBAC tests

Soniya Vyas svyas at redhat.com
Wed Jun 16 15:33:31 UTC 2021


Hello everyone,

I was just curious about writing RBAC tests, hence while writing them I
came across certain analysis and confusions.

Analysis:-

Whenever an api is called within patrole for its testing, it's the call to
its respective service client. Like, let's say we need to test
'create_network:is_default', naturally for expected result we need to call
the api first, which would be a call to neutron client's create_network[1].

Question:-

But which api's to call for logging resource[2]?For example, let's say we
need to write a RBAC test for Create log.
As far as I know, Openstack uses python's default logging extension. So the
question is which api's to call for the expected result.

In Patrole, there are no assertions with expected and actual data. So, How
do RBAC-tests test the api?

Any help with these confusions would be greatly appreciated.

[1]
https://review.opendev.org/c/openstack/patrole/+/583340/4/patrole_tempest_plugin/tests/api/network/test_networks_rbac.py#100
[2] https://docs.openstack.org/api-ref/network/v2/?expanded=#log-resource

Thanks and Regards,
Soniya Vyas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20210616/d0553aae/attachment-0001.html>


More information about the openstack-discuss mailing list