Commit Graph

2257 Commits

Author SHA1 Message Date
coreycb
41fbc20583 Add kinetic support (#977) 2023-01-11 15:18:01 +00:00
Felipe Reyes
7367cdc5e9 Merge pull request #979 from ajkavanagh/bug/2002156/rabbitmq-intermittent-tests
Fix race in test 408 for rabbitmq
2023-01-11 11:44:54 -03:00
Alex Kavanagh
22e0311243 Try to get tests to pass with assertions 2023-01-11 13:48:29 +00:00
Alex Kavanagh
b53c782ed0 Fix bad asserting in Series Upgrade test 2023-01-11 13:01:32 +00:00
Alex Kavanagh
0383c97a82 Try to get GH CI to run
* Remove added libyaml-dev - it's already installed
* Re pin PyYAML to 3.9 rather than 3.10
2023-01-11 12:55:53 +00:00
Alex Kavanagh
d905f70468 Add libyaml-dev to bin requirements for the GH testing 2023-01-11 12:46:46 +00:00
Alex Kavanagh
f96e41f45a Relax pbr constraint to allow pip to resolve 2023-01-06 20:33:13 +00:00
Alex Kavanagh
9ad7e55a5f Fix race in test 408 for rabbitmq
There is a race in the 408 test for rabbitmq where the config-change to
enable ssl causes a leader-settings-changed hook in the non-leader units
which results in a rabbitmq service restart.  This can happen at exactly
the same time as the test attempts to establish a connection with the
that unit. This patch retries the connection attempt.

Note that this may only be a partial fix as it's possible that a restart
will happen just after the connection is made, which would then result
in a test failure.

Related-Bug: LP#2002156
2023-01-06 20:12:08 +00:00
Frode Nordahl
4f27f95f68 Merge pull request #933 from mkalcok/ovn-downscale
Tests for ovn-central downscaling and cluster status
2022-11-28 12:02:52 +01:00
Martin Kalcok
dadac36ccf Determine OVN leader/follower status based on cluster-status action. 2022-11-22 14:30:10 +01:00
Martin Kalcok
574d8d91d2 Merge remote-tracking branch 'upstream/master' into ovn-downscale 2022-11-22 12:59:49 +01:00
coreycb
0480f72056 Merge pull request #976 from openstack-charmers/bug/designate-tempest
Add new required dns.nameservers config
2022-11-21 09:50:29 -05:00
Chris MacNaughton
d0193e3817 Add new required dns.nameservers config 2022-11-21 14:31:24 +00:00
Felipe Reyes
d083dde10c Retry check of service IP configured (#970)
There are scenarios where the config-changed hook can complete, yet the
service IP get configured many seconds after, because a relation-changed
hook execution needs to be triggered on the hacluster side of the
relation.

This change adds a retry to the check (10 times with a 2 seconds wait
time).

This issue was found at the gate https://review.opendev.org/c/openstack/charm-designate-bind/+/861417
2022-10-28 16:30:26 +01:00
Peter Sabaini
74bca90a6f Ceph: also check ceph-mgr (#973)
In the ceph lowlevel test, also check for ceph-mgr process and
service.
2022-10-27 13:46:08 +02:00
coreycb
c8ae6cdc55 Add retry decorator to masakari segment creation (#972)
The create_segment() function is often failing in the gate
due to being unable to establish a connection to the masakari
endpoint. This will allow some more time for the endpoint to
become available when this error occurs.
2022-10-27 13:19:34 +02:00
Liam Young
9928a6825d Merge pull request #859 from jneo8/test/mysql-prometheus-mysql-exporter
Add tests for mysql prometheus exporter
2022-10-26 15:32:22 +01:00
jneo8
db21233890 test(zaza/openstack/charm_tests/mysql/test_prometheus_mysql_exporter.py): Add HTTP metrics query check 2022-10-26 22:13:12 +08:00
jneo8
f079b9cddb fix(zaza/openstack/charm_tests/mysql/test_prometheus_mysql_exporter.py): Fix snap naming and configure to fit new snap release 2022-10-26 22:13:12 +08:00
jneo8
f39ea121a4 style(zaza/openstack/charm_tests/mysql/test_prometheus_mysql_exporter.py): Update docstring style 2022-10-26 22:13:12 +08:00
jneo8
788fd77137 test(zaza/openstack/charm_tests/mysql/test_prometheus_mysql_exporter.py): Add tests for mysql prometheus exporter 2022-10-26 22:13:12 +08:00
coreycb
cbabcf1469 Merge pull request #960 from freyes/migrate-to-pytest
Migrate from nosetest to pytest
2022-10-25 15:00:06 -04:00
Felipe Reyes
ad215019e4 Unpin PyYAML for python>=3.10
PyYAML<5.1 fails with the error below on Python 3.10

    AttributeError: module 'collections' has no attribute 'Hashable'

The fix got available by this commit
9959328b41
2022-10-25 15:41:25 -03:00
Felipe Reyes
7b65b73010 Migrate from nosetest to pytest
nosetest doesn't support python 3.10 and over the years the python
community has been settling on pytest as test runner, this change
introduces pytest and adds py3.10 to the gh workflow testing matrix.
2022-10-25 15:17:50 -03:00
Felipe Reyes
49ba14c255 Merge pull request #959 from coreycb/master
Drop unrelated Python versions
2022-10-25 15:02:38 -03:00
Corey Bryant
0fe0f0167c Drop unrelated Python versions
Python 3.5, 3.6, and 3.7 are no longer needed on this branch.
2022-10-25 13:12:43 -04:00
Martin Kalcok
a0abb64826 Run update-status before searching for OVN leader 2022-10-24 11:49:12 +02:00
Martin Kalcok
570a9f1a57 Include fix for race condition when using wait_for_application_states
In some testing environment, `wait_for_application_states()` can
execute before juju starts actually performing changes on the
units, causing it to return immediately.
2022-10-21 14:29:55 +02:00
Liam Young
827d81fc12 Allow tempest to run in minimal mode (#956)
Add test class that runs tempest in miminal mode. This is useful
for testing that the OpenStack apis are responding but there are
components not configured like an external network. In addtion
some missing doc strings were added and support for neutron
tempest configuration pre ussuri removed as there is a branch
for that.
2022-10-20 11:18:04 +01:00
Billy Olsen
6662503432 Merge pull request #955 from coreycb/masaskari-jammy
Update masakari test to launch jammy instance
2022-10-18 13:15:09 -07:00
Corey Bryant
9eac7470a7 Update masakari test to launch jammy instance 2022-10-18 19:25:36 +00:00
Liam Young
89fd74c5db Add method to check OpenStack endpoints (#953)
* Add method to check OpenStack endpoints

Add method to check OpenStack endpoints are returning acceptable
http codes. This should be used with caution as a charm whould
indicate if its payload is not ready via workload status and
workload status messages

* Fix dox string
2022-10-14 12:59:26 +01:00
Martin Kalcok
9e72765731 Updated tests to add their own unit for destruction and added test for downscaling. 2022-10-13 04:41:36 +02:00
Chris MacNaughton
98a1c8948a [ceph] remove white-box testing migrated from amulet (#951) 2022-10-12 15:34:14 +01:00
Liam Young
fe3b638b8a Merge pull request #948 from javacruft/get-admin-passwords-k8s
k8s: use action to retrieve admin password
2022-10-11 14:01:23 +01:00
James Page
bab65e8c2e k8s: use action to retrieve admin password
The Keystone K8S operator now uses generated passwords; make use
of the helper action to retrieve the admin password.
2022-10-11 11:43:01 +01:00
Guilherme Maluf Balzana
98faf67846 Add glance-simplestreams-sync set_latest_property config functest (#853)
When creating Openstack VMs the user has to specify the image it wants
to use. sstream-mirror-glance adds a date to the image name, so they
always have to recheck which is the current latest image.

This commit tests the usage of the `set_latest_property` configuration.

When --set-latest-property is given sstream-mirror-glance will set the
recently synced image with the `latest=true` property and then remove
the `latest` property from all the os_version/architecture matching
images.

Closes-bug: LP #1933130
2022-10-07 18:35:36 +00:00
Billy Olsen
6fdccd680c Merge pull request #929 from hernandanielg/test-cloudkitty
Add test for cloudkitty charm
2022-10-05 15:14:41 -07:00
Felipe Reyes
a55f320c2a Add test for keystone-openidc (#925)
* Add keystone-openidc setup code.

The keystone-openidc charm requires 2 configuration steps:

1) Configure the oidc-client-id, oidc-client-secret and
   oidc-provider-metadata-url, this information is tightly related to
   the Identity Provider configured, which for testing purposes this is
   the openidc-test-fixture charm, the setup function
   zaza.openstack.charm_tests.openidc.setup.configure_keystone_openidc
   takes care of setting these values once the fixture charm is ready
   for service.
2) Create the OpenStack objects to correctly configure the federation,
   this is made by the setup function
   zaza.openstack.charm_tests.openidc.setup.keystone_federation_setup_site1
   which will create and configure the following resources:
   - Create a domain named 'federated_domain'.
   - Create a group named 'federated_users'.
   - Grant the 'Member' role to users in the 'federated_users' group.
   - Create an identity provider named 'openid'.
   - Create a mapping named 'openid_mapping'.
   - Create a federation protocol named 'openid' that relates the mapping
     and the identity provider.

* Add support for v3oidcpassword auth plugin.

get_keystone_session() uses the v3.OidcPassword class when the
OS_AUTH_TYPE is set to v3oidcpassword, this class expects the following
extra configuration options:

- OS_IDENTITY_PROVIDER
- OS_PROTOCOL
- OS_CLIENT_ID
- OS_CLIENT_SECRET
- OS_ACCESS_TOKEN_ENDPOINT (optional)
- OS_DISCOVERY_ENDPOINT (optional)

* Add test for keystone-openidc

This patch introduces a new testing class named CharmKeystoneOpenIDCTest
which interacts with keystone using users provided by
openidc-test-fixture via OpenID Connect.

* Add keystone_session argument to launch instances.

Adding the option to pass a keystone session allows callers to use
credentials different from the ones provided by
get_overcloud_keystone_session(), this is helpful when testing non
default keystone configurations (e.g. Federation).

* Add zaza.openstack.charm_tests.openidc.tests.TestLaunchInstance

This testing class configures a private network in the user's project defined by the mapping
rules during the setUpClass stage. Specifically this test performs the following steps:

- Create keypair named 'zaza' in the user's project
- Create a router for the project
- Attach the router to the external network
- Create a network
- Create a subnet attached to the previously create network
- Connect the subnet to the project's router

The testing method launches an instance using a keystone session
associated with a user backed by OpenID Connect.
2022-10-05 13:34:18 +01:00
Liam Young
99186a6651 Add k8s compatible method for keystone auth (#945)
* Add k8s compatible method for keystone auth

* Mock out is_k8s_deployment
2022-10-03 18:27:56 +01:00
Liam Young
65cc55a5db Remove liberty special case (#944)
* Remove liberty special case

* Update unit test
2022-10-03 12:52:30 +01:00
hernandanielg
ace6e6d70b added group create and delete test 2022-10-01 00:17:22 +00:00
Billy Olsen
5f60808b2e Merge pull request #943 from coreycb/ensure-lts-images
Add jammy image to octavia ensure_lts_images()
2022-09-30 12:20:45 -07:00
Corey Bryant
8919e508c0 Add jammy image to octavia ensure_lts_images() 2022-09-30 17:08:48 +00:00
hernandanielg
84c58b44a4 added services field and mapping tests 2022-09-30 06:05:37 +00:00
hernandanielg
627e2d82b1 added module_enable test 2022-09-30 01:10:29 +00:00
Felipe Reyes
a729e81a71 Merge pull request #936 from swalladge/pin-pyopenssl-setup-py
Pin pyOpenSSL in setup.py
2022-09-29 21:54:19 -03:00
Samuel Walladge
a6a540aebb Pin pyOpenSSL in setup.py
It was pinned in requirements.txt,
but this isn't picked up when installing this via pip.
So, it needs to be pinned in the setup.py install_require list too.
2022-09-30 08:56:31 +09:30
hernandanielg
ecf5f1e108 initial commit 2022-09-29 22:55:41 +00:00
Martin Kalcok
5ab5bb8344 Tests for ovn-central downscaling and cluster status 2022-09-28 22:46:30 +02:00