Commit Graph

1136 Commits

Author SHA1 Message Date
Chris MacNaughton
fa4587f366 Ensure that origin is set only after the first machine is rebooting 2020-04-15 16:38:42 +02:00
Chris MacNaughton
c492ecdcac Add functional test that covers Ubuntu Lite in Parallel 2020-04-15 15:54:44 +02:00
Chris MacNaughton
592622935c tidy up and add more debugability 2020-04-15 10:06:41 +02:00
Chris MacNaughton
6c70ee5171 The units in an application need to be idle before we try to series-upgrade them 2020-04-14 12:42:18 +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
a7df42a9df According to the series upgrade doc, source should update early 2020-04-10 16:27:03 +02:00
Chris MacNaughton
208439cdf1 Add unit tests for pre and post-app upgrade functions 2020-04-10 11:42:21 +02:00
Chris MacNaughton
183b3c012f Add unit tests for new rabbit and mysql helpers 2020-04-10 11:02:38 +02:00
Chris MacNaughton
4d38a158f0 Tox coverage reporting shoulg be zaza.openstack only 2020-04-10 11:02:22 +02:00
Chris MacNaughton
e2d6a5c081 Add test coverage for follower-first upgrades 2020-04-10 10:50:43 +02:00
Chris MacNaughton
7649bcb10e Skip the async unit tests on py35 2020-04-10 10:50:43 +02:00
Chris MacNaughton
74652f2523 Add unit test coverage for series upgrades
This also includes some tidying
2020-04-10 10:50:43 +02:00
Chris MacNaughton
9cd4b32aa3 Remove leftover development comments, useless function 2020-04-10 10:50:43 +02:00
Chris MacNaughton
392470e946 Cleanup based on feedback
This change removes some redundant checking at setup
time and splits the long parameter lists into one
argument per line lists
2020-04-10 10:50:43 +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
Chris MacNaughton
f383064b17 Merge pull request #226 from ChrisMacNaughton/feature/configure-codecov
Add codecov configuration to exclude the charm tests
2020-04-10 10:46:12 +02:00
Chris MacNaughton
a47640cf69 Add codecov configuration to exclude the charm tests
This does not, however, exclude the configure code in
charm_tests as that can, and should, be unit tested :)
2020-04-10 10:37:58 +02:00
Chris MacNaughton
db7dd70add Merge pull request #225 from ChrisMacNaughton/feature/add-coverage
Add coverage reporting for unit tests
2020-04-10 09:32:18 +02:00
Chris MacNaughton
2b9d27b1f0 Add coverage reporting for unit tests 2020-04-09 17:31:34 +02:00
Liam Young
c91daa4d3d Merge pull request #223 from ajkavanagh/extend-cinder-tests-timeouts
Extend resource wait timeouts for cinder tests (juju storage)
2020-04-08 11:11:14 +01: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
Alex Kavanagh
ef3df9ef71 Merge pull request #220 from openstack-charmers/bug/unpacking
Resolve issue with too many values to unpack
2020-04-06 15:22:21 +01: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
Alex Kavanagh
bc92a793cd Merge pull request #218 from openstack-charmers/ChrisMacNaughton-patch-1
Update path to the noop test
2020-04-03 10:16:59 +01:00
Chris MacNaughton
c2cfa9c4f7 Merge pull request #219 from AurelienLourot/remove-broken-tests
Remove broken functional test folder
2020-04-03 08:25:59 +02:00
Aurelien Lourot
b87c4e485b Remove broken functional test folder
Rationale:

1. `tox.ini` doesn't have a `func` target so probably these tests haven't
   been run for a long time.

2. These tests can't be run at the moment because of conflicting version
   ranges in python deps pulled via `requirements.txt` and `setup.py`, e.g.

   error: PyYAML 3.13 is installed but pyyaml<=6.0,>=5.1.2 is required by
          {'juju'}
   error: python-keystoneclient 3.21.0 is installed but
          python-keystoneclient>=3.22.0 is required by
          {'python-openstackclient'}

3. These tests don't have expectations. They just deploy a bundle.
2020-04-03 08:12:48 +02:00
Chris MacNaughton
8acb08a904 Update path to the noop test 2020-04-02 15:44:17 +02:00
Chris MacNaughton
5d46f6df1b Revert - didn't mean to commit directly 2020-04-02 15:43:59 +02:00
Chris MacNaughton
c712cd5222 Fix path to the noop test 2020-04-02 15:42:56 +02:00
Alex Kavanagh
f796527682 Merge pull request #215 from gnuoy/get_unit_hostnames-fqdn
Add support for fqdn in get_unit_hostnames
2020-04-01 14:47:31 +01:00
Liam Young
a822f6995b Added unit tests 2020-04-01 13:45:47 +00:00
Liam Young
c65cbceb19 Add support for fqdns to get_unit_hostnames 2020-04-01 13:22:50 +00:00
Alex Kavanagh
4fe9706a53 Merge pull request #212 from gnuoy/add-custom-assertions
Add custom assertions
2020-04-01 14:06:53 +01: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
456882f8fa Merge pull request #211 from ChrisMacNaughton/bug/upgrade-non-leaders
Secondary first upgrades should also support the origin argument
2020-04-01 09:03:19 +01:00
Chris MacNaughton
42b0f5fcb1 Secondary first upgrades should also support the origin argument
Closes #210
2020-04-01 09:31:03 +02:00
Alex Kavanagh
404355a617 Merge pull request #209 from gnuoy/create-base-charm-test-case
Add BaseCharmTest class without OpenStack setup.
2020-03-31 17:30:04 +01: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
Alex Kavanagh
b717690c2a Merge pull request #208 from openstack-charmers/revert-198-remove-client-version
Revert "Remove client version from Manila Test"
2020-03-27 14:10:23 +00:00