<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 24, 2015 at 1:18 PM, melanie witt <span dir="ltr"><<a href="mailto:melwittt@gmail.com" target="_blank">melwittt@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Feb 24, 2015, at 9:47, Sean Dague <<a href="mailto:sean@dague.net">sean@dague.net</a>> wrote:<br>
<br>
> I'm happy if there are other theories about how we do these things,<br>
> being the first functional test in the python-novaclient tree that<br>
> creates and destroys real resources, there isn't an established pattern<br>
> yet. But I think doing all CLI calls in CLI tests is actually really<br>
> cumbersome, especially in the amount of output parsing code needed if<br>
> you are going to setup any complicated resource structure.<br>
<br>
</span>I think I'm in agreement with the pattern you describe.<br>
<br>
I imagine having a set of functional tests for the API, that don't do any CLI calls at all. With that we test that the API works properly. Then have a separate set for the CLI, which only calls CLI for the command being tested, everything else to set up and tear down the test done by API calls. This would be done with the rationale that because the entire API functionality is tested separately, we can safely use it for setup/teardown with the intent to isolate the CLI test to the command being tested and avoid introducing side effects from the CLI commands.<br>
<br>
But I suppose one could make the same argument for using CLI everywhere (if they are all tested, they can also be trusted not to introduce side effects). I tend to favor using the API because it's the most bare bones setup/teardown we could use. At the same time I understand the idea of performing an entire test using the CLI, as a way of replicating the experience a real user might have using the CLI, from start to end. I don't think I feel strongly either way.</blockquote><div><br></div><div> I guess its time to revisit the actual status of novaclient and if we want to actively move away from it to openstacksdk/OSC as well. If we are actively trying to move away from novaclient, using the python API as much as possible makes a lot of sense.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
For the --poll stuff, I agree the API should have it and the CLI uses it. And with and without "poll" functionality should be tested separately, API and CLI.<br>
<br>
melanie (melwitt)<br>
<br>
<br>
<br>
<br>
<br>__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br></div></div>