Skip to content

Commit

Permalink
Fix aodh test
Browse files Browse the repository at this point in the history
Signed-off-by: Fabricio Aguiar <[email protected]>
  • Loading branch information
fao89 committed Oct 23, 2024
1 parent b3f3745 commit 941efd9
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 38 deletions.
38 changes: 27 additions & 11 deletions ci/tempest/ci_fw_vars.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,29 @@
---
# note by default the source for the playbook specified
# in the hooks is relative to
# https://github.com/openstack-k8s-operators/ci-framework/tree/main/hooks/playbooks
# if you want to use a different source you can use the full path on the ansible controller

post_ctlplane_deploy:
- name: 71 Kustomize control plane to enable heat service
cifmw_edpm_prepare_timeout: 60
pre_deploy_create_coo_subscription:
source: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/heat-operator'].src_dir }}/ci/create-coo-subscription-playbook.yaml"
type: playbook
source: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/heat-operator'].src_dir }}/ci/tempest/control_plane_hook.yaml"
- name: 82 Kustomize and update Control Plane
type: playbook
source: control_plane_kustomize_deploy.yml
cifmw_edpm_prepare_kustomizations:
- apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: openstack
patches:
- patch: |-
apiVersion: core.openstack.org/v1beta1
kind: OpenStackControlPlane
metadata:
name: unused
spec:
heat:
enabled: true
telemetry:
enabled: true
template:
metricStorage:
enabled: true
monitoringStack:
alertingEnabled: false
autoscaling:
enabled: true
target:
kind: OpenStackControlPlane
26 changes: 0 additions & 26 deletions ci/tempest/control_plane_hook.yaml

This file was deleted.

10 changes: 10 additions & 0 deletions ci/tempest/create-coo-subscription-playbook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
- name: "Create the cluster-observability-operator subscription"
hosts: "{{ cifmw_target_hook_host | default('localhost') }}"
gather_facts: false
environment:
KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}"
PATH: "{{ cifmw_path }}"
tasks:
- name: Import tasks for creating COO subscription
ansible.builtin.include_tasks: "create-coo-subscription.yaml"
33 changes: 33 additions & 0 deletions ci/tempest/create-coo-subscription.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
- name: Create the COO subscription
ansible.builtin.shell:
cmd: |
oc create -f - <<EOF
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: cluster-observability-operator
namespace: openshift-operators
spec:
channel: development
installPlanApproval: Automatic
name: cluster-observability-operator
source: redhat-operators
sourceNamespace: openshift-marketplace
EOF
register: output

# need to have a wait here, since the csv is not created immediately. There is a slight delay, during which time, the oc wait command would fail, since there's no resource to watch
- name: Wait for the required resource to be created
ansible.builtin.command:
cmd:
oc get csv --namespace=openshift-operators -l operators.coreos.com/cluster-observability-operator.openshift-operators
delay: 10
retries: 20
register: output
until: output.stdout_lines | length != 0

- name: Wait for the resources to be available
ansible.builtin.command:
cmd: |
oc wait --timeout=300s --for jsonpath="{.status.phase}"=Succeeded csv --namespace=openshift-operators -l operators.coreos.com/cluster-observability-operator.openshift-operators
9 changes: 8 additions & 1 deletion zuul.d/jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,19 @@
validation.run_validation true
identity.v3_endpoint_type public
identity.v2_admin_endpoint_type public
service_available.ceilometer true
service_available.sg_core true
service_available.aodh true
telemetry.sg_core_service_url "https://ceilometer-internal.openstack.svc.cluster.local:3000"
telemetry.prometheus_service_url "https://metric-storage-prometheus.openstack.svc.cluster.local:9090"
telemetry.ceilometer_polling_interval 120
telemetry.prometheus_scrape_interval 30
telemetry.alarm_threshold 50000000000
cifmw_test_operator_tempest_include_list: |
heat_tempest_plugin.*
cifmw_test_operator_tempest_exclude_list: |
heat_tempest_plugin.tests.functional.test_os_wait_condition.OSWaitCondition.test_create_stack_with_multi_signal_waitcondition
heat_tempest_plugin.tests.scenario.test_server_cfn_init.CfnInitIntegrationTest.test_server_cfn_init
heat_tempest_plugin.tests.scenario.test_aodh_alarm.AodhAlarmTest.test_alarm
heat_tempest_plugin.tests.scenario.test_base_resources.BasicResourcesTest.test_base_resources_integration
heat_tempest_plugin.tests.scenario.test_server_signal.ServerSignalIntegrationTest.test_server_signal_userdata_format_raw
heat_tempest_plugin.tests.scenario.test_server_signal.ServerSignalIntegrationTest.test_server_signal_userdata_format_software_config
Expand Down

0 comments on commit 941efd9

Please sign in to comment.