fix(smoke): use azure-pipelines.yml URI to match AzDO schema glob
All checks were successful
Build and Deploy iLSP / test (push) Successful in 21s
Build and Deploy iLSP / build-and-deploy (push) Successful in 58s

The AzDO schema is only applied by yaml-language-server when the file
URI matches the configured globs (azure-pipelines.yml / *.yaml). The
smoke test was using 'plain-pipeline.yml' which never matched, causing
test [8] to always return 0 completions.

Also increased didOpen → completion sleep from 0.8s to 1.5s to give
yaml-ls time to parse the 1.6MB AzDO schema JSON.
This commit is contained in:
Henrik Jess Nielsen
2026-05-10 17:27:44 +02:00
parent e5ba01a52b
commit 703d5d67a8

View File

@@ -391,7 +391,7 @@ async def check_yaml_template_completion(ws: aiohttp.ClientWebSocketResponse) ->
async def check_azdo_task_completion(ws: aiohttp.ClientWebSocketResponse) -> None:
"""Cursor after '- task: ' — expect AzDO task completions from schema."""
print("\n[8] AzDO task completion (- task: <cursor>@azdo-schema)")
task_doc_uri = "file:///tmp/smoke_test/plain-pipeline.yml"
task_doc_uri = "file:///tmp/smoke_test/azure-pipelines.yml"
task_doc = "steps:\n - task: "
await ws.send_bytes(_frame({
"jsonrpc": "2.0",
@@ -405,7 +405,7 @@ async def check_azdo_task_completion(ws: aiohttp.ClientWebSocketResponse) -> Non
}
},
}))
await asyncio.sleep(0.8)
await asyncio.sleep(1.5) # yaml-ls needs time to parse 1.6MB AzDO schema
lines = task_doc.split("\n")
last_line = len(lines) - 1
last_char = len(lines[-1])