Commit Graph

60 Commits

Author SHA1 Message Date
Liam Young a828774c48 Handle change of CA cert.
Closes issue #487
2021-01-23 16:17:54 +00:00
Aurelien Lourot c09a9af3b2 Make linter happy 2020-09-24 10:54:14 +02:00
Aurelien Lourot 6b93fb3acb Do not hide real exception on test failure 2020-09-24 10:35:01 +02:00
Frode Nordahl 158e8ce37f octavia/policyd: Change target for policyd test
List available provider drivers as policyd test, this should be
more light weight than creating and retrieving a load-balancer.

Fixes #349
2020-07-22 10:40:29 +02:00
Liam Young 9896c8d9c5 Skip test_003_test_overide_is_observed
Skip test_003_test_overide_is_observed until Bug #1880959 is fix
released.
2020-07-14 14:08:31 +00:00
David Ames 7783e38f66 Handle race in policyd tests 2020-05-07 22:17:31 +00:00
Frode Nordahl e93fa0b571 neutron/policyd: Use `create_network` for test
At present the neutron policyd test assumes a network visible to
the demo user has already been created at the time of the test
being executed.

This may not always be the case, so let's manage the resource we
use for the test.
2020-04-17 15:26:41 +02:00
Frode Nordahl f35da80f27 Unpin flake8, fix lint
Add Python 3.8 env in Travis CI test matrix.

At present the pinning of flake8 disallows running of lint on
Python 3.8 systems.

Update flake8 ignore-list to ignore W504 instead of W503, the PEP
guidance is that either is ok, but there must be local consistency.

There are more occurences of binary operator before line-break
than after in this repository, and we have also chosen to ignore
W504 in most of our other repositories.
2020-04-07 11:14:49 +02:00
Frode Nordahl e28b9e0c48 policyd: Use different policy for test of Keystone
A side effect of migrating to bootstrapping Keystone as opposed
to using the admin_token is that the charm credentials is now
subject to the Keystone policy.

At present the ``list_services`` policy is used as a test of the
Policy Override feature, however revoking access to said call
will make the charm go into an error state as it attempts to use
it as part of managing the Keystone CRUD.

Change the test to use the ``list_credentials`` policy for test
instead.
2020-03-11 13:50:04 +01:00
Frode Nordahl d66358ce41 policyd/octavia: Use correct network for vips
Which network to use for vips depend on deployment configuration.
2020-02-04 09:16:44 +01:00
Frode Nordahl 2961196333 neutron: Retry operation after change of config
There is a race between `neutron-api` charm readiness and actual
API readiness.

Fixes #138
2019-11-29 16:39:50 +01:00
Alex Kavanagh d5f8f762e8 Fix up octavia test to work with refactored _rule after openstack-dashboard test merge 2019-11-21 14:55:28 +00:00
Alex Kavanagh b00e570e57 Add octavia policyd tests
Providing a policy.d test for Octavia is a bit more complicated as the
obvious policy is just to prevent listing of load balancers;
unfortunately it doesn't work in the upstream, as the code doesn't check
the policy in octavia.  However, "showing" an load balancer does involve
a policy check and so the test is more complicated than 'normal' policy
tests in that a resource is created, then the policy override is checked
and then the resource is deleted.
2019-11-21 14:50:57 +00:00
Alex Kavanagh 1b5613ac00 Fix pep8 issue 2019-11-21 09:22:57 +00:00
Alex Kavanagh 28db85e06c Fix more policyd tests so that they can work o-s dashboard
The difference in how openstack-dashboard and every other service uses
policies continues to create special cases.  This set of fixes deals
with some more of those differences.
2019-11-20 17:23:26 +00:00
Alex Kavanagh c0db2def3b Modified policyd tests to support openstack-dashboard
* Addition of the (incomplete) openstack-dashboard test.
* Modification of other charm policyd override tests to support
  multi-file policy overrides resource ZIP.
2019-11-20 17:23:26 +00:00
Frode Nordahl 4298be05d2 policyd: await agent status executing after config change
The current implementation may miss waiting for config change to
actually happen as it in some circumstances jumps to waiting for a
idle state prior to the model executing anything.

Add a wait for agent status `executing` immediatelly after config
change to avoid this.

Fixes #123
2019-11-13 14:29:18 +01:00
Alex Kavanagh b95f6e6e7d Add heat policy.d functional tests 2019-11-06 11:40:20 +00:00
Alex Kavanagh b33afe9cb3 Add note re: GlanceTest function 2019-10-07 23:06:22 +01:00
Alex Kavanagh 81c4432136 Improve logging on the policyd tests
This has no 'testing' changes, just improves the logging output.
2019-10-07 22:06:21 +01:00
Alex Kavanagh 001635e23b Fix skiptest on policyd
The wrong approach was used.  It was supposed to be a raise rather than
just a cls call.  This PR fixes-up the SkipTest in policyd.
2019-10-07 10:10:27 +01:00
Alex Kavanagh 909a8d8969 Add remaining policyd tests for 19.10 release
This adds the modified neutron-api, glance, cinder policyd
tests.  In particular, the test verifies that an operation can be
overriden and removed and that the api calls works, doesn't work, and
then works again.
2019-10-03 17:22:29 +01:00
Alex Kavanagh 6b75086957 Add neutron-api charm policyd test 2019-10-03 17:22:29 +01:00
Alex Kavanagh fe70f56b26 Add base specializer for Keystone test 2019-10-03 17:22:29 +01:00
Alex Kavanagh 3e2d98b1ed Fix pep8 failures 2019-09-25 14:43:10 +01:00
Alex Kavanagh 13128db1f4 Add docs to policyd module 2019-09-25 14:43:10 +01:00
Alex Kavanagh 6648aaf0e9 Add negative test for broken yaml 2019-09-25 14:43:10 +01:00
Alex Kavanagh ec74e6a57c Switch the order of the tests 2019-09-25 14:43:10 +01:00
Alex Kavanagh 060d86fe27 Hopefully finalising the services test 2019-09-25 14:43:10 +01:00
Alex Kavanagh 086076c6fc Still trying to find a call that works with the user 2019-09-25 14:43:10 +01:00
Alex Kavanagh 9d4008c9f4 More robust test 2019-09-25 14:43:10 +01:00
Alex Kavanagh d4568caf93 Fix missing prefixes from other module 2019-09-25 14:43:10 +01:00
Alex Kavanagh bdd225a1ee Switch keystone user to demo and try to list projects instead 2019-09-25 14:43:10 +01:00
Alex Kavanagh 6a0867e223 Fixed keystone spedific test 2019-09-25 14:43:10 +01:00
Alex Kavanagh 8a42af4e41 Fix keystone specific test - more 2019-09-25 14:43:10 +01:00
Alex Kavanagh 61f7cce1d0 Fix keystone specific test 2019-09-25 14:43:10 +01:00
Alex Kavanagh b1e6beb919 Further work to get keystone specific test to work 2019-09-25 14:43:10 +01:00
Alex Kavanagh ae6b1d7849 Try to fix mixin class set up bug 2019-09-25 14:43:10 +01:00
Alex Kavanagh 1337531926 Create specific policyd override for keystone 2019-09-25 14:43:10 +01:00
Alex Kavanagh c744b1a288 Create generic / keystone test idea 2019-09-25 14:43:10 +01:00
Alex Kavanagh 024a4b0ff7 move async code to zaza 2019-09-25 14:43:10 +01:00
Alex Kavanagh 55ae4aad28 Add in check to test for removal of file 2019-09-25 14:43:10 +01:00
Alex Kavanagh 3465dacb96 change approach to waiting on results bug fix 2019-09-25 14:43:10 +01:00
Alex Kavanagh 36f775390c change approach to waiting on results 2019-09-25 14:43:10 +01:00
Alex Kavanagh 89a6d9ca39 More test debugging again 2019-09-25 14:43:10 +01:00
Alex Kavanagh 1110ced7c1 More test debugging 2019-09-25 14:43:10 +01:00
Alex Kavanagh 67f1650917 Add further disable tests1 2019-09-25 14:43:10 +01:00
Alex Kavanagh aae3366fc9 Add further disable tests 2019-09-25 14:43:10 +01:00
Alex Kavanagh 2beddeafef more iteration to discover workload stats 2019-09-25 14:43:10 +01:00
Alex Kavanagh ce8c72e1a1 tests to determine app status 2019-09-25 14:43:10 +01:00