From 7610b82e0030cf41454f57082ca3e9241549cd38 Mon Sep 17 00:00:00 2001 From: Mariam Ahhttouche Date: Mon, 16 Feb 2026 11:38:07 +0100 Subject: [PATCH] uv_python module: add integration test for when uv executable does not exist --- .../integration/targets/uv_python/tasks/main.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/integration/targets/uv_python/tasks/main.yaml b/tests/integration/targets/uv_python/tasks/main.yaml index 3495a18984..2e58ea92de 100644 --- a/tests/integration/targets/uv_python/tasks/main.yaml +++ b/tests/integration/targets/uv_python/tasks/main.yaml @@ -8,6 +8,20 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +- name: Install python 3.14 when no uv executable exists + uv_python: + version: 3.14 + state: present + check_mode: yes + register: failed_install + ignore_errors: true + +- name: Verify python 3.14 installation failed + assert: + that: + - failed_install["failed"] is true + - '"Failed to find required executable" in failed_install["msg"]' + - name: Install uv shell: | curl -LsSf https://astral.sh/uv/install.sh | sh