Commit Graph

2230 Commits

Author SHA1 Message Date
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
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
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
Felipe Reyes
615d83c57d Pin pyopenssl<22.1.0 (#930)
pyopenssl depends on a newer version of cryptography since 22.1.0.

a145fc3bc6
2022-09-27 11:06:30 +01: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
Frode Nordahl
778feeb773 Merge pull request #924 from dshcherb/2022-09-dpdk-separate
Move DPDK-related functions to DPDKTest
2022-09-21 09:14:46 +02: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
Frode Nordahl
16706e799d Merge pull request #923 from dshcherb/2022-09-dpdk-separate
Separate DPDK tests from other chassis tests
2022-09-20 15:23:42 +02: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
Liam Young
a65ef82ef5 Fix code for non-ha keystone saml mellon deploys (#912)
When deployed in a non-ha setup the keystone ip can fail to be
found due to problems with getting ips of subordinates. Also,
there is duplicate code for finding the keystone ip so put this
in the setup class.
2022-09-15 14:42:13 +01:00
Liam Young
cc1ecce0ad Merge pull request #909 from fnordahl/skip-nrpe-when-not-present
ovn: Skip NRPE tests when NRPE is not related to charm under test
2022-09-14 08:06:34 +01:00
Frode Nordahl
9d40566786 ovn: Skip NRPE tests when NRPE is not related to charm under test
To unblock the OVN charm gates we need to remove NRPE from the
gate bundles.
2022-09-14 08:40:12 +02:00
Frode Nordahl
d64795209d Merge pull request #899 from gnuoy/fix-dashboard-url
Fix dashboard policy tests.
2022-09-13 09:03:02 +02:00
Utkarsh Bhatt
91748b598c Adds scaledown check and verification for stoppage of synchronisation. (#863) 2022-09-12 18:37:06 +00:00
Liam Young
6246326729 Fix dashboard policy tests.
The dashboard policyd  override tests assume the deloyment is http
and non-ha. This is not a safe assumption so use the existing code
to generate the correct domain listing url.
2022-09-12 14:20:41 +00:00
Luciano Lo Giudice
acf30b3a8a Add functional tests for ceph-mon actions. (#866)
* Add functional tests for ceph-mon actions.

This PR adds functional validation for 2 actions of the ceph-mon
charm that are currently being rewritten.

Cleanup after the tests run.

Co-authored-by: Luciano Lo Giudice <luciano.logiudice@canonical.com>
2022-09-09 11:24:10 +00:00
James Page
30477b92df Merge pull request #897 from swalladge/test-fix-tests
fix vault tests
2022-09-09 09:01:31 +01:00
Samuel Walladge
8fe6f9078f Reload all vault units in reload test
`get_unit_name_from_ip_address` along with the ip from vault client
has proven flaky in this situation.
Not sure why.
But better to reload all vault units anyway,
so we can take a simpler route here.
2022-09-09 15:07:18 +09:30
Felipe Reyes
e92fae8c3b Merge pull request #887 from gnuoy/fix-manila-ganesha-restart
Fix Ganesha _restart_share_instance for non-ha
2022-09-08 12:44:00 -03:00
Liam Young
33a6408c83 Set and log model name 2022-09-08 12:55:04 +00:00
Liam Young
f3724b2281 Add additional logging 2022-09-08 08:21:21 +00:00
Liam Young
778d36e1fa Fix Ganesha _restart_share_instance for non-ha
Manila Ganesha is not always deployed in an ha configuration in
functional tests. This means there is no automated restart of the
manila services but the _restart_share_instance method shuts down
manila services via systemctl and expects them to be automatically
started. This change detects if the hacluster charm is present, if
it is it defaults it used the old behaviour otherwise systemctl
is used to restart the services.
2022-09-08 05:54:05 +00:00
Frode Nordahl
695f91a4c6 Merge pull request #886 from gnuoy/manila-use-jammy
Switch manila tests to use jammy guest
2022-09-08 07:34:43 +02:00
Liam Young
3e4df7d52e Switch manila tests to use jammy guest 2022-09-07 21:45:45 +00:00
Felipe Reyes
e6082056f6 Merge pull request #884 from dshcherb/2022-09-add-zed
Add a codename and release pair for Zed
2022-09-06 19:24:18 -03:00
Dmitrii Shcherbakov
87d347d02a Add a codename and release pair for Zed 2022-09-07 00:57:26 +03:00
Frode Nordahl
a53ad38e75 Merge pull request #868 from gnuoy/fix-swift-replica-tests
Respect model in get_swift_storage_topology
2022-09-06 10:34:30 +02:00
Liam Young
c57ac56951 Merge pull request #865 from esunar/openstack-dashboard-caching-headers
Added tests for charm-openstack-dashboard
2022-09-05 08:15:13 +01:00