Commit Graph

1400 Commits

Author SHA1 Message Date
Felipe Reyes 2cd18b484d Replace assertEquals with assertEqual.
DeprecationWarning: Please use assertEqual instead.
2023-02-14 14:45:20 -03:00
Felipe Reyes 535275750e Add magnum section to tempest.conf template
The magnum section is used to declare configuration specific information
used by magnum-tempest-plugin

The keys used are:

- nic_id, to indicate the external network
- image_id, to indicate the fedora-coreos image to be used
- flavor_id, the flavor id to use when creating clusters
- dns_nameserver, the upstream dns server IP.
- network_driver, the network driver to test (flannel).
- labels, to pass a custom (local) image registry.
- insecure_registry, to mark the custom image registry as http (instead
  of https).
2023-02-14 14:45:20 -03:00
Felipe Reyes fa09a20b4b Add support for Magnum to use different images per release.
OpenStack Magnum relies on specific versions of Fedora CoreOS, this
patch addresses this maintaining a map of images per release according
to the upstream documentation[0]

The images are expected to be stored in the object store pointed out by
TEST_SWIFT_IP[1] environment variable in a container named 'magnum'. A
bash script to upload images can be found at
./zaza/openstack/charm_tests/magnum/upload_fedora_coreos_images.sh

[0] https://docs.openstack.org/magnum/latest/user/index.html#supported-versions
[1] https://github.com/openstack-charmers/zosci-config/pull/262
2023-02-14 14:45:11 -03:00
Corey Bryant d054d3e695 Add lunar and antelope identifiers for OpenStack 2023-02-02 16:07:08 -05:00
Felipe Reyes 46b53253db test_300_default_soa_config_option: Change logging statements from debug to info
This test is unstable, increasing the logging from debug to info allows
to the CI runs to expose more information and understand what part of
the test is staying blocked and leading the CI job to time out.

Related-Bug: http://pad.lv/2003775
2023-01-30 10:31:48 -03:00
coreycb a381f910c3 Merge pull request #983 from openstack-charmers/bug/ceph-tests-without-openstack
Migrate several Ceph test cases to not use the openstack base
2023-01-23 14:09:20 -05:00
Chris MacNaughton 1a529276df Migrate several Ceph test cases to not use the openstack base 2023-01-23 09:43:23 -05:00
Bas de Bruijne 9fb488efef Update series upgrade automation (#952)
* update series upgrade test

* bug fixes

* bug fixes
2023-01-23 12:39:10 +00:00
Liam Young 33edff6360 Revert "Test get-csr with existing CA (#974)"
This reverts commit 58f2b88365.
2023-01-16 20:40:32 +00:00
Felipe Reyes 8feaf396bd Merge pull request #980 from Basdbruijne/sqa_integration
Make network, images, and keypair names envars
2023-01-16 12:12:51 -03:00
Bas de Bruijne feb667206b make provider-router name variable 2023-01-11 15:39:15 +00:00
Liam Young bf2273c59a Add retry logic around Trilio CRUD commands (#770) 2023-01-11 15:36:59 +00:00
Bas de Bruijne d3c9be2f84 make network and image names variable 2023-01-11 15:34:02 +00:00
Liam Young 58f2b88365 Test get-csr with existing CA (#974)
Check that if an existing CA is present then get-csr requires the
force flag. Test using new action name regenerate-intermediate-ca
2023-01-11 15:19:40 +00:00
coreycb 41fbc20583 Add kinetic support (#977) 2023-01-11 15:18:01 +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
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
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
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
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
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
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
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
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
Utkarsh Bhatt 6a222d1210 replaced deprecated relation (#926)
Co-authored-by: utkarshbhatthere <utkarsh.bhatt@canonical.com>
2022-09-24 15:01:49 +02:00
Frode Nordahl bf3cecfcd4 ovn: Remove workaround for EOL release (#927)
The workaround was specifically targeting Groovy which is now EOL.

Also remove the `current_release` class variable as it is no
longer needed.

Related-Bug: #1852221
2022-09-23 19:51:52 +01:00
Dmitrii Shcherbakov 787415ae94 Move DPDK-related functions to DPDKTest
The previous change

268b4297b4

did not move the rest of the functions required to actually run the
test case.
2022-09-20 23:34:55 +03:00
Dmitrii Shcherbakov 268b4297b4 Separate DPDK tests from other chassis tests
We do not yet support DPDK for ovn-dedicated-chassis, therefore, we need
to avoid running DPDK func tests for it.
2022-09-20 16:20:13 +03:00
coreycb 383726b15e Remove workaround for Octavia Bug #1964117 (#922)
Remove the work around for Bug #1964117 now that it is fixed
in the latest ovs package versions in ubuntu and the cloud
archive. This is fixed in the following versions of ovs:
xena (2.16.4), jammy/yoga (2.17.2), and kinetic (3.0.0).
2022-09-19 15:58:05 +01:00