feat: add ansible/roles/turboquant-deploy/tasks/integration_test.yml for TurboQuant deployment
This commit is contained in:
38
ansible/roles/turboquant-deploy/tasks/integration_test.yml
Normal file
38
ansible/roles/turboquant-deploy/tasks/integration_test.yml
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
# Post-deploy integration tests
|
||||
|
||||
- name: Wait for TurboQuant service to be ready
|
||||
uri:
|
||||
url: "http://localhost:{{ llama_cpp_port }}/v1/models"
|
||||
method: GET
|
||||
status_code: 200
|
||||
register: model_check
|
||||
retries: 30
|
||||
delay: 5
|
||||
until: model_check.status == 200
|
||||
|
||||
- name: Test inference with tool call
|
||||
uri:
|
||||
url: "http://localhost:{{ llama_cpp_port }}/v1/chat/completions"
|
||||
method: POST
|
||||
body_format: json
|
||||
body:
|
||||
model: "gemma-4"
|
||||
messages:
|
||||
- role: "user"
|
||||
content: "Say 'test passed' and nothing else."
|
||||
max_tokens: 20
|
||||
status_code: 200
|
||||
register: inference_test
|
||||
|
||||
- name: Verify inference response
|
||||
assert:
|
||||
that:
|
||||
- "'choices' in inference_test.json"
|
||||
- "inference_test.json.choices | length > 0"
|
||||
fail_msg: "Inference test failed - no valid response"
|
||||
success_msg: "Inference test passed"
|
||||
|
||||
- name: Report test results
|
||||
debug:
|
||||
msg: "Integration test passed on {{ inventory_hostname }}"
|
||||
Reference in New Issue
Block a user