Commit Graph

384 Commits

Author SHA1 Message Date
Chris MacNaughton
c492ecdcac Add functional test that covers Ubuntu Lite in Parallel 2020-04-15 15:54:44 +02:00
Chris MacNaughton
27e5f7d8bc We must have async functions for the before/after callables 2020-04-10 16:51:41 +02:00
Chris MacNaughton
2a98274d67 Add a few more function hooks to the series upgrade process
By including pre and pos-application functions, charm
series upgrades can be handled in a more generic way,
even when they require running additional actions
before a unit is upgraded, or after the whole application
is upgraded.
2020-04-10 10:50:43 +02:00
Chris MacNaughton
186708e883 Change upgrade process to handle each machine fully
Updating each machine in a fully self-contained way makes
it easy to add per-machine and (possibly) per-application
post-upgrade function calls. This still performs the actual
series upgrades fully in parallel but will, for example,
start the do-release-upgrade on one unit while another is
still performing the initial dist-upgrade
2020-04-10 10:50:43 +02:00
Chris MacNaughton
cf1ea4c71b First pass at batched parallel series upgrade 2020-04-10 10:50:43 +02:00
Alex Kavanagh
147b94e1f6 Extend resource wait timeouts for cinder tests (juju storage)
As the cinder charm now has Juju storage support, the cinder
tests needs their timeouts extended as Juju storage on serverstack
is MUCH, MUCH slower than ephemeral storage (which is local to the
host).
2020-04-08 10:52:03 +01:00
Liam Young
cf2b0f21b9 Merge pull request #222 from openstack-charmers/issue/221
octavia: tear down resources created during LBaasV2 test
2020-04-08 07:34:41 +01:00
Frode Nordahl
91c120a650 octavia: only run tearDown on success 2020-04-08 07:35:14 +02:00
Frode Nordahl
116da9ca6c octavia: tear down resources created during LBaasV2 test
Fixes #221
2020-04-07 17:56:37 +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
Chris MacNaughton
33fa6e02de Fix typo 2020-04-06 16:13:56 +02:00
Chris MacNaughton
d3974c84a3 Fix iterating over applications 2020-04-06 16:12:00 +02:00
Liam Young
be8889e581 Move new methods out of test class
The new methods assertActionRanOK & assertRemoteRunOK are useful in
setup as well as tests so it makes sense to move them out of the
test class.
2020-04-01 10:18:30 +00:00
Liam Young
a3f1230aea Remove prints 2020-04-01 09:08:10 +00:00
Liam Young
588d38d4d7 Add custom assertions
Add custom assertions to check that remote actions and commands
run ok.
2020-04-01 08:58:36 +00:00
Liam Young
9cb7876e19 Add BaseCharmTest class without OpenStack setup.
The ceph-iscsi charm is a non-openstack api charm that also needs
config changed and pause/resume tests.
2020-03-31 16:22:03 +00:00
Camille Rodriguez
3f8a09605e Add functional tests for charm-keystone-kerberos (#206)
* kerberos authentication tests

* kerberos authentication setup and test

* kerberos authentication setup and test

* kerberos authentication setup and test

* pep8 corrections

* pep8 corrections

* remove hardcoded code

* add logging

* fix keytab location

* add logging

* add logging and custom exception for kerberos test server errors

* syntax list

* adding empty keytab in setup

* pep8

* Kerberos custom exception

* date

* fix creation of empty file

* logging

* wait until workload is active

* wait until workload is active

* Edit tests for optimal configuration and logging

* remove empty lines

* add logging to tests

* add logging to tests, import subprocess

* tests.py need setup.py get_unit_full_hostname function

* token retrieval test

* add dns to test host as well as keystone

* test keystone token

* user needs to be the one created in the kerberos system (i.e admin)

* openstack token issue to confirm authentication

* openstack token issue to confirm authentication

* pep8

* cmd has to be formatted differently for subprocess call

* fix error

* piping password to the kinit prompt

* add a verification for the cached kerberos token file

* add a verification for the cached kerberos token file

* must wait for subprocess to go through to check result

* change config to run the kerberos client tests on a ubuntu vm

* change config to run the kerberos client tests on a ubuntu vm

* change config to run the kerberos client tests on a ubuntu vm

* install krb5-client on ubuntu test host

* install krb5-client on ubuntu test host

* retrieve openstack token

* stderr is a dict

* adding python-pip and keystoneauth1[kerberos]

* adding python-pip and keystoneauth1[kerberos]

* adding python-pip and keystoneauth1[kerberos]

* add other mandatory packages to test host

* pep8

* unused exception, removing

* revert change

* rename run_all_tests for run_all_configuration_tests

* install the python3 packages
2020-03-30 16:36:50 -05:00
Liam Young
f5feea4b51 Merge pull request #197 from ChrisMacNaughton/feature/parallel-series-upgrade
Enable parallel / asynchronous series upgrade
2020-03-27 15:54:36 +00:00
Chris MacNaughton
bf3c3628a1 Revert "Remove client version from Manila Test" 2020-03-27 13:45:48 +01:00
Chris MacNaughton
6bf6dcd8e8 fix lint 2020-03-25 15:36:22 +01:00
Chris MacNaughton
71b9d5a6fb lint fixes 2020-03-25 15:26:08 +01:00
Chris MacNaughton
a1e5649d12 Refactor if-statement into upgrade config generator 2020-03-25 08:44:41 +01:00
Chris MacNaughton
d4ee838d4b some refactoring and updates from review 2020-03-25 08:44:41 +01:00
Chris MacNaughton
0a94b97cf4 update for style bits 2020-03-25 08:44:41 +01:00
Chris MacNaughton
0b92a15da7 raise exceptions in the upgrade process 2020-03-25 08:44:41 +01:00
Chris MacNaughton
8450216f72 Create parallel (async) series upgrade 2020-03-25 08:44:41 +01:00
Chris MacNaughton
93fd631b1a Split up and re-organize upgrade helpers 2020-03-25 08:44:41 +01:00
Chris MacNaughton
6c3e4e60ac Merge pull request #202 from ajkavanagh/enable-focal-rabbitmq-server-testing
Update rabbitmq tests for version 3.8.2 on focal
2020-03-24 13:32:31 +01:00
Alex Kavanagh
175b1c90a3 Merge pull request #201 from openstack-charmers/verify-tls
radosgw: Adjust exceptions selected for retry
2020-03-24 12:23:14 +00:00
Alex Kavanagh
7076053627 Update rabbitmq tests for version 3.8.2 on focal
Ubuntu focal ships with rabbitmq server 3.8.2 which has changed the text
output format for the cli commands that the tests rely on.  Fortunately,
3.8.2 also adds a --formatter=json option.  This patch takes advantage
of that.
2020-03-23 17:49:22 +00:00
Frode Nordahl
c22753e4ef radosgw: Adjust exceptions selected for retry
A set of the exceptions we want to catch all descend from
``IOError``.  Let's see if this covers them all.
2020-03-23 13:42:40 +01:00
Frode Nordahl
7bfecaffc7 Merge pull request #200 from openstack-charmers/verify-tls
radosgw: Add retry for object storage test
2020-03-23 12:16:47 +01:00
Frode Nordahl
c6f0f79ea5 radosgw: Add retry for object storage test
When testing with TLS there is a chance the deployment will appear
done and idle prior to ceph-radosgw and Keystone have updated the
service catalog.  Retry the test in this circumstance.
2020-03-23 12:06:37 +01:00
Alex Kavanagh
ab6a7692a4 Merge pull request #199 from openstack-charmers/verify-tls
radosgw: Pass local CA cert to client when relevant
2020-03-23 10:44:00 +00:00
Frode Nordahl
1ece576981 radosgw: Pass local CA cert to client when relevant 2020-03-23 10:58:23 +01:00
Chris MacNaughton
c7360ea4b1 Remove client version from Manila Test 2020-03-20 14:40:12 +01:00
Chris MacNaughton
7418d0079a Merge pull request #191 from openstack-charmers/keystone-remove-admin-token
keystone: expect security check no admin-token to pass
2020-03-19 17:30:35 +01:00
Frode Nordahl
00ad21f42f swift: Add S3 API test 2020-03-16 13:39:07 +01:00
David Ames
0546e01b62 Merge pull request #187 from openstack-charmers/neutron-break-out-network-create-test
Break out Neutron create network through the API test
2020-03-11 17:45:52 +01: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
cbdb3086a1 keystone: expect security check no admin-token to pass
Also add test to validate that the domain named ``default``
literally has an ID of ``default``.
2020-03-11 10:58:44 +01:00
Chris MacNaughton
7e9cc9998f Merge pull request #190 from gnuoy/masakari-fixes
Fixes for masakari tests
2020-03-10 15:22:05 +01:00
Liam Young
f1168aa36d Fixes for masakari tests
* Deal with hypervisors now using fqdn
* Skip instant restart tests until bug is resolved
2020-03-10 10:21:14 +00:00
Aurelien Lourot
9e3b88678c Add Gnocchi tests
https://bugs.launchpad.net/charm-gnocchi/+bug/1828424
2020-03-09 11:26:55 +01:00
Frode Nordahl
72fb1cf7e7 Break out Neutron create network through the API test
This is broken out into a separate class as it can be useful as
standalone tests for Neutron plugin subordinate charms.
2020-03-06 11:15:41 +01:00
Aurelien Lourot
d389e357e2 Remove obsolete comment 2020-03-05 12:37:40 +01:00
Aurelien Lourot
707b36c0f8 Add a ceilometer test case and fix existing ones for trusty/mitaka
https://bugs.launchpad.net/charm-ceilometer/+bug/1828424
2020-03-05 11:11:49 +01:00
Chris MacNaughton
48470b7bd7 Merge pull request #180 from thedac/mysql8-migration
Percona to MySQL InnoDB Cluster migration
2020-03-01 13:49:00 +01:00
David Ames
23cc3e2a9a Lint fix 2020-02-27 16:18:19 +00:00
Chris MacNaughton
1b3b33d83a Ensure that the Manila tests exit 2020-02-27 15:31:29 +01:00