Add microk8s + tempest functional tests
Depends-On: https://review.opendev.org/c/openstack/charm-ops-sunbeam/+/861885 Change-Id: Ib6313cc2c3042d26d58d22c215ae53da054957b0
This commit is contained in:
parent
037f153956
commit
575cef2e79
1
charms/glance-k8s/.gitignore
vendored
1
charms/glance-k8s/.gitignore
vendored
@ -6,3 +6,4 @@ build/
|
||||
.coverage
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
tempest.log
|
||||
|
@ -2,3 +2,6 @@
|
||||
templates:
|
||||
- openstack-python3-charm-yoga-jobs
|
||||
- openstack-cover-jobs
|
||||
- microk8s-func-test
|
||||
vars:
|
||||
charm_build_name: glance-k8s
|
||||
|
@ -1,7 +1,5 @@
|
||||
- project:
|
||||
templates:
|
||||
- charm-unit-jobs-py38
|
||||
- charm-unit-jobs-py310
|
||||
- charm-publish-jobs
|
||||
vars:
|
||||
needs_charm_build: true
|
||||
|
@ -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
|
||||
|
71
charms/glance-k8s/tests/bundles/xena.yaml
Normal file
71
charms/glance-k8s/tests/bundles/xena.yaml
Normal file
@ -0,0 +1,71 @@
|
||||
bundle: kubernetes
|
||||
applications:
|
||||
|
||||
mysql:
|
||||
charm: ch:mysql-k8s
|
||||
channel: edge
|
||||
scale: 1
|
||||
trust: false
|
||||
|
||||
# Currently traefik is required for networking things.
|
||||
# If this isn't present, the units will hang at "installing agent".
|
||||
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
|
||||
|
||||
# required for glance
|
||||
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: ../../glance-k8s.charm
|
||||
scale: 1
|
||||
trust: true
|
||||
resources:
|
||||
glance-api-image: kolla/ubuntu-binary-glance-api:xena
|
||||
storage:
|
||||
local-repository: 5G
|
||||
|
||||
relations:
|
||||
- - keystone:identity-service
|
||||
- glance:identity-service
|
||||
- - rabbitmq:amqp
|
||||
- glance:amqp
|
||||
|
||||
- - traefik:ingress
|
||||
- keystone:ingress-internal
|
||||
- - traefik-public:ingress
|
||||
- keystone:ingress-public
|
||||
- - traefik:ingress
|
||||
- glance:ingress-internal
|
||||
- - traefik-public:ingress
|
||||
- glance:ingress-public
|
||||
|
||||
- - mysql:database
|
||||
- keystone:database
|
||||
|
||||
- - mysql:database
|
||||
- glance:database
|
43
charms/glance-k8s/tests/tests.yaml
Normal file
43
charms/glance-k8s/tests/tests.yaml
Normal file
@ -0,0 +1,43 @@
|
||||
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.glance.setup.add_lts_image
|
||||
- zaza.openstack.charm_tests.glance.setup.add_cirros_image
|
||||
- zaza.openstack.charm_tests.glance.setup.add_cirros_alt_image
|
||||
tests:
|
||||
- zaza.openstack.charm_tests.tempest.tests.TempestTestWithKeystoneV3
|
||||
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"
|
||||
|
||||
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: '^$'
|
||||
glance:
|
||||
workload-status: active
|
||||
workload-status-message-regex: '^$'
|
||||
keystone:
|
||||
workload-status: active
|
||||
workload-status-message-regex: '^$'
|
||||
mysql:
|
||||
workload-status: active
|
||||
workload-status-message-regex: '^$'
|
@ -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_MAX_RESOLVE_COUNT = 5
|
||||
TEST_MODEL_SETTINGS = automatically-retry-hooks=true
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user