Add functional tests

Change-Id: Iab3240bb8967ff7a960ee01b0a32334250ef1e9e
This commit is contained in:
Liam Young 2022-10-20 10:28:59 +00:00
parent c9d5a898b1
commit f181eff3bf
7 changed files with 234 additions and 2 deletions

View File

@ -8,3 +8,4 @@ __pycache__/
*.py[cod]
.tox
.stestr/
tempest.log

View File

@ -2,3 +2,7 @@
templates:
- openstack-python3-charm-yoga-jobs
- openstack-cover-jobs
- microk8s-func-test
vars:
charm_build_name: neutron-k8s
juju_channel: 2.9/edge

View File

@ -1,7 +1,5 @@
- project:
templates:
- charm-unit-jobs-py38
- charm-unit-jobs-py310
- charm-publish-jobs
vars:
needs_charm_build: true

View File

@ -8,3 +8,7 @@ coverage
mock
flake8
stestr
git+https://github.com/openstack-charmers/zaza.git#egg=zaza
git+https://github.com/openstack-charmers/zaza-openstack-tests.git#egg=zaza.openstack
git+https://opendev.org/openstack/tempest.git#egg=tempest
ops

View File

@ -0,0 +1,130 @@
bundle: kubernetes
applications:
traefik:
charm: ch:traefik-k8s
channel: edge
scale: 1
trust: true
traefik-public:
charm: ch:traefik-k8s
channel: edge
scale: 1
trust: true
options:
kubernetes-service-annotations: metallb.universe.tf/address-pool=public
mysql:
charm: ch:mysql-k8s
channel: edge
scale: 1
trust: false
rabbitmq:
charm: ch:sunbeam-rabbitmq-operator
channel: edge
scale: 1
trust: true
keystone:
charm: ch:keystone-k8s
channel: edge
scale: 1
trust: true
options:
admin-role: admin
storage:
fernet-keys: 5M
credential-keys: 5M
glance:
charm: ch:glance-k8s
channel: edge
scale: 1
trust: true
storage:
local-repository: 5G
nova:
charm: ch:nova-k8s
channel: edge
scale: 1
trust: true
placement:
charm: ch:placement-k8s
channel: edge
scale: 1
trust: true
neutron:
charm: ../../neutron-k8s.charm
scale: 1
trust: true
resources:
neutron-server-image: kolla/ubuntu-binary-neutron-server:xena
ovn-central:
charm: ch:ovn-central-k8s
channel: edge
scale: 1
trust: true
vault:
charm: ch:icey-vault-k8s
channel: stable
scale: 1
resources:
vault-image: vault
relations:
- - mysql:database
- keystone:database
- - traefik:ingress
- keystone:ingress-internal
- - traefik-public:ingress
- keystone:ingress-public
- - mysql:database
- glance:database
- - rabbitmq:amqp
- glance:amqp
- - keystone:identity-service
- glance:identity-service
- - traefik:ingress
- glance:ingress-internal
- - traefik-public:ingress
- glance:ingress-public
- - mysql:database
- nova:database
- - mysql:database
- nova:api-database
- - mysql:database
- nova:cell-database
- - rabbitmq:amqp
- nova:amqp
- - keystone:identity-service
- nova:identity-service
- - traefik:ingress
- nova:ingress-internal
- - traefik-public:ingress
- nova:ingress-public
- - mysql:database
- placement:database
- - keystone:identity-service
- placement:identity-service
- - traefik:ingress
- placement:ingress-internal
- - traefik-public:ingress
- placement:ingress-public
- - mysql:database
- neutron:database
- - rabbitmq:amqp
- neutron:amqp
- - keystone:identity-service
- neutron:identity-service
- - traefik:ingress
- neutron:ingress-internal
- - traefik-public:ingress
- neutron:ingress-public
- - vault:insecure-certificates
- neutron:certificates
- - neutron:ovsdb-cms
- ovn-central:ovsdb-cms
- - vault:insecure-certificates
- ovn-central:certificates

View File

@ -0,0 +1,67 @@
gate_bundles:
- xena
smoke_bundles:
- xena
configure:
- zaza.openstack.charm_tests.keystone.setup.wait_for_all_endpoints
- zaza.openstack.charm_tests.keystone.setup.add_tempest_roles
- zaza.openstack.charm_tests.nova.setup.create_flavors
- zaza.openstack.charm_tests.nova.setup.manage_ssh_key
tests:
- zaza.openstack.charm_tests.tempest.tests.TempestTestWithKeystoneMinimal
tests_options:
trust:
- xena
ignore_hard_deploy_errors:
- xena
tempest:
default:
smoke: True
exclude-list:
- "tempest.api.image.v2.test_images.BasicOperationsImagesTest.test_register_upload_get_image_file"
- "tempest.api.compute.security_groups.test_security_group_rules.SecurityGroupRulesTestJSON.test_security_group_rules_create"
- "tempest.api.compute.security_groups.test_security_group_rules.SecurityGroupRulesTestJSON.test_security_group_rules_list"
- "tempest.api.compute.security_groups.test_security_groups.SecurityGroupsTestJSON.test_security_groups_create_list_delete"
- "tempest.api.compute.servers.test_server_actions.ServerActionsTestJSON"
- "tempest.api.compute.servers.test_create_server.ServersTestManualDisk"
- "tempest.api.compute.servers.test_server_addresses.ServerAddressesTestJSON"
- "tempest.api.compute.servers.test_create_server.ServersTestJSON"
- "tempest.scenario.test_server_multinode.TestServerMultinode.test_schedule_to_all_nodes"
- "tempest.scenario.test_server_basic_ops.TestServerBasicOps.test_server_basic_ops"
- "tempest.api.compute.servers.test_attach_interfaces.AttachInterfacesUnderV243Test.test_add_remove_fixed_ip"
target_deploy_status:
traefik:
workload-status: active
workload-status-message-regex: '^$'
traefik-public:
workload-status: active
workload-status-message-regex: '^$'
rabbitmq:
workload-status: active
workload-status-message-regex: '^$'
nova:
workload-status: active
workload-status-message-regex: '^$'
glance:
workload-status: active
workload-status-message-regex: '^$'
neutron:
workload-status: active
workload-status-message-regex: '^$'
ovn-central:
workload-status: active
workload-status-message-regex: '^$'
keystone:
workload-status: active
workload-status-message-regex: '^$'
mysql:
workload-status: active
workload-status-message-regex: '^$'
placement:
workload-status: active
workload-status-message-regex: '^$'
vault:
workload-status: active
workload-status-message-regex: '^$'

View File

@ -83,6 +83,34 @@ commands =
coverage xml -o cover/coverage.xml
coverage report
[testenv:func-noop]
basepython = python3
commands =
functest-run-suite --help
[testenv:func]
basepython = python3
commands =
functest-run-suite --keep-model
[testenv:func-smoke]
basepython = python3
setenv =
TEST_MODEL_SETTINGS = automatically-retry-hooks=true
TEST_MAX_RESOLVE_COUNT = 5
commands =
functest-run-suite --keep-model --smoke
[testenv:func-dev]
basepython = python3
commands =
functest-run-suite --keep-model --dev
[testenv:func-target]
basepython = python3
commands =
functest-run-suite --keep-model --bundle {posargs}
[coverage:run]
branch = True
concurrency = multiprocessing