Commit Graph

13 Commits

Author SHA1 Message Date
Stephen Finucane 28ffa2bf9f Blacken openstackclient.compute
Black used with the '-l 79 -S' flags.

A future change will ignore this commit in git-blame history by adding a
'git-blame-ignore-revs' file.

Change-Id: I9af45c062d179ab3dc2a5e969e1c467932753a2b
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2023-05-10 10:51:30 +01:00
Stephen Finucane 874519e980 tests: Convert compute tests to use 'parse_output'
Change-Id: Ib5b2f46639f14877a9ec295b26cae01a05395d4d
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-11-29 16:21:29 +00:00
Eric Fried 3b409e4d0e Refactor AggregateTests
While investigating the referenced story/bug I noticed that
wait_for_status in
openstackclient.tests.functional.compute.v2.test_aggregate.AggregateTests
was doing a lot more than it should ever need to (it probably got copied
in from somewhere). The two places calling it only need to a) check the
output of `openstack aggregate show`, and b) try once -- since they just
got done creating the aggregate synchronously, there should never be a
need to delay/retry. So this commit removes the helper method and just
inlines the check.

At the same time, the addCleanup(aggregate delete) directives are moved
above their respective creates. This is a defensive best practice which
makes sure cleanup happens even if something fails very soon after the
actual back-end create (as was in fact the case with the referenced
bug/story).

It is unknown whether this will impact the referenced bug.

Change-Id: I0d7432f13642fbccd5ca79da9c76adfcbabb5fa9
Story: 2006811
Related-Bug: #1851391
2019-11-05 21:32:15 +00:00
Dean Troyer de8ab5e8fd More aggregate functional race chasing
AggregateTests.wait_for_status() was a classmethod, those often
are sources of conflict in parallel testing...

Change-Id: I6211fd9c36926ca97de51a11923933d4d9d2dfda
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-09-10 14:09:29 -05:00
Dean Troyer 03a2accb2f Format aggregate command fields and de-race functional tests
Rename metadata to property in all aggregate commands

Beef up functional tests to reduce street racing

Change-Id: I4598da73b85a954f3e6a3981db21891b45d9548c
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-08-26 17:50:06 -05:00
Dean Troyer 99c3be93c8 Serialize more aggregate functional tests
These tests are showing signs of problems running in parallel
so serialse the create/delete/list/set/unset tests.  They all
used two aggregates each anyway...

Change-Id: Iba4b52c179e6914eaeefea1da0f7eaefcdcf1f87
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-05-17 19:15:28 -05:00
Dean Troyer bb659cf438 Aggregate functional test tweak
This seems to still be racy, lengthen the timeout to wait for
agregate creation.

Change-Id: I3601c5baee03745ae21714b9dff0e278ad016877
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-05-16 07:43:55 -05:00
Dean Troyer 26c268a910 Slow down and retry aggregate create/delete to lessen race
Change-Id: I676894c1bfd3156313d88e6457250b9ff226118b
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2018-07-06 13:15:59 -05:00
Dean Troyer 949e0cb3c6 Attempt to work around chronically failing server issues with aggregates and qos
So yeah, this is not kosher for functional tests, but we're testing the
client interaction, not the raciness of Nova or Neutron.  Failure to delete
is not our problem.

Change-Id: I21043f1de0fbacee1aec63110fb12a7cff42e0a0
2017-09-15 12:34:15 -05:00
Dean Troyer 346ac9da62 Nova-net functional tests: aggregates
Nova-net requires a cells v1 configuration to run as of Ocata, but
aggregates and cells v1 are not golfing buddies, so don't let them
meet on the back nine.

Skip the aggregate add/remove host commands in the cells v1 config,
leave the others because they should work, just not be very useful.

And format things consistently.

Change-Id: I131d9f883cb7aca53ad82fb7d5fc6ee1c1e7d923
2017-05-02 14:09:16 -05:00
zhiyong.dai 7d8602c9bc Functional test for aggregate
Using json format output in aggregate functional tests.
Remove resource create/delete from setupClass() and
teardownClass() methods

Change-Id: I6494ca63bfe8a51de0f65570fddcaf38f6c42dbb
2016-11-28 02:32:48 +08:00
zhiyong.dai 2476a26d99 Update functional test for aggregate.
Add the following functional tests :
    option: "--no-property"
    command: "aggregate set --zone",
             "aggregate add host",
             "aggregate remove host".

Change-Id: Ia9c31facb5f0f5b92b8df950fd4021b8ecc924c5
2017-01-16 20:58:33 +00:00
Steve Martinelli c14d3efe61 move all functional tests to tests module
functional tests should be grouped with other tests (unit and
integration tests). as part of this commit the "common" module
was renamed to just "base", this was done for simplicity.

the post_test_hook.sh file was also copied to the functional module
since it should live there. a separate change to the infra repo
will be made to call the new location, once that is merged we
can remove the old one (a new change will also be posted for that)

Needed-By: I49d54f009021d65c1ae49faf6b3f0a7acdadd7b3
Change-Id: Ie8c334f6223373b8e06df8bd8466500d2a2c8ede
2016-09-09 03:29:47 +00:00