Skip to content

Commit b489b27

Browse files
committed
[ci] Simplify the mock Lightspeed test job
Configure the AnsibleTest runner directly through existing job settings and remove the preparation hook, extra Tempest stage and OGX image override. Keep result collection and authenticated test access. As per Lukas reviews. Use only the in-cluster mock and dummy provider token. Leave the real OpenAI secret and its lifecycle hooks disconnected from this job; real-provider validation is follow-up work. Merge lightspeed-tests #17 before final validation against upstream default. Related-Issue: #OSPRH-33344 Signed-off-by: malingatembo <tembomalinga@gmail.com>
1 parent 2577192 commit b489b27

1 file changed

Lines changed: 69 additions & 12 deletions

File tree

‎zuul.d/jobs.yaml‎

Lines changed: 69 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,87 @@
1010
required-projects:
1111
- openstack-k8s-operators/lightspeed-operator
1212
- openstack-k8s-operators/ci-framework
13-
# Use the prepared test checkout, including Depends-On changes.
14-
- openstack-k8s-operators/lightspeed-tests
1513
vars:
1614
pre_tests_01_deploy_lightspeed_operator:
1715
source: install-openstack-lightspeed.yml
1816
type: playbook
1917

2018
cifmw_run_tests: true
2119
cifmw_test_operator_fail_on_test_failure: true
22-
# Retain the inherited default Tempest stage, then test Lightspeed in a Pod.
20+
# Run Lightspeed integration tests through test-operator.
2321
cifmw_test_operator_stages:
24-
- name: tempest
25-
type: tempest
2622
- name: lightspeed
2723
type: ansibletest
28-
pre_test_stage_hooks:
29-
- name: Prepare Lightspeed tests
30-
source: prepare-openstack-lightspeed-tests.yml
31-
type: playbook
32-
test_vars_file: "{{ cifmw_basedir }}/artifacts/lightspeed-test-stage.yml"
3324

25+
cifmw_test_operator_namespace: openstack
26+
cifmw_test_operator_privileged: true
27+
cifmw_test_operator_selinux_level: s0:c478,c978
28+
cifmw_test_operator_ansibletest_name: ansibletest
29+
cifmw_test_operator_ansibletest_image: quay.io/podified-antelope-centos9/openstack-ansible-tests
30+
cifmw_test_operator_ansibletest_image_tag: current-podified
31+
# Merge lightspeed-tests #17 before final validation of this job.
32+
cifmw_test_operator_ansibletest_ansible_git_repo: https://github.com/openstack-k8s-operators/lightspeed-tests
33+
cifmw_test_operator_ansibletest_ansible_git_branch: ""
34+
cifmw_test_operator_ansibletest_ansible_playbook_path: playbooks/run_lightspeed_tests.yaml
35+
cifmw_test_operator_ansibletest_ansible_inventory: |
36+
localhost ansible_connection=local ansible_python_interpreter=python3
37+
cifmw_test_operator_ansibletest_debug: false
38+
cifmw_test_operator_ansibletest_resources:
39+
requests:
40+
cpu: 1000m
41+
memory: 1Gi
42+
limits:
43+
cpu: 2000m
44+
memory: 2Gi
45+
# Use the existing reader definition override to match the test Pod.
46+
cifmw_test_operator_log_pod_definition:
47+
apiVersion: v1
48+
kind: Pod
49+
metadata:
50+
name: "test-operator-logs-pod-{{ run_test_fw }}-{{ test_operator_instance_name }}"
51+
namespace: "{{ stage_vars_dict.cifmw_test_operator_namespace }}"
52+
spec:
53+
securityContext:
54+
runAsUser: 227
55+
runAsGroup: 227
56+
fsGroup: 227
57+
seLinuxOptions:
58+
level: "{{ cifmw_test_operator_selinux_level }}"
59+
containers:
60+
- name: test-operator-logs-container
61+
image: "{{ cifmw_test_operator_logs_image }}"
62+
command: ["sleep"]
63+
args: ["infinity"]
64+
volumeMounts: "{{ _test_operator_volume_mounts }}"
65+
volumes: "{{ _test_operator_volumes }}"
66+
tolerations: "{{ cifmw_test_operator_tolerations | default(omit) }}"
67+
nodeSelector: "{{ cifmw_test_operator_node_selector | default(omit) }}"
68+
cifmw_test_operator_ansibletest_ansible_var_files: |
69+
test_suite_path: /var/lib/ansible/ansible
70+
lightspeed_url: "https://lightspeed-app-server.{{ cifmw_openstack_lightspeed_namespace | default('openstack-lightspeed') }}.svc.cluster.local:8443"
71+
lightspeed_timeout: 120
72+
lightspeed_token_file: /lightspeed-auth/token
73+
pytest_args: "-v --tb=short --color=no tests/integration"
74+
junit_xml_path: /var/lib/AnsibleTests/external_files/baseline.xml
75+
cifmw_test_operator_ansibletest_extra_mounts:
76+
- name: lightspeed
77+
extraVol:
78+
- propagation: [AnsibleTest]
79+
extraVolType: Undefined
80+
volumes:
81+
- name: lightspeed-client-token
82+
projected:
83+
sources:
84+
- serviceAccountToken:
85+
path: token
86+
expirationSeconds: 3600
87+
mounts:
88+
- name: lightspeed-client-token
89+
mountPath: /lightspeed-auth
90+
readOnly: true
91+
92+
# Fake LLM only; real-provider credentials are a follow-up.
3493
cifmw_openstack_lightspeed_mock_enabled: true
35-
# Use the corrected Solr search provider; retain the default API image.
36-
cifmw_openstack_lightspeed_ogx_image: quay.io/lightspeed-core/lightspeed-stack:0.7.0
3794

3895
# Operator catalog image from content-provider dependency
3996
cifmw_openstack_lightspeed_catalog_image: "{{ content_provider_registry_ip }}:5001/openstack-k8s-operators/lightspeed-operator-index:{{ zuul.patchset }}"

0 commit comments

Comments
 (0)