summarylogtreecommitdiffstats
path: root/0001-tests-gcs-skip-tests-without-google-cloud-module.patch
blob: 57edb1d76aee97e71aafe0b5abab5448d0bd6b57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From e5e1bb8c1320946bcf97cb5ee025b30b52c1fa94 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= <thomas@t-8ch.de>
Date: Sun, 28 Apr 2024 17:32:37 +0200
Subject: [PATCH nbdkit] tests: gcs: skip tests without google cloud module
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
To: libguestfs@redhat.com, "Richard W.M. Jones" <rjones@redhat.com>

The gcs plugin uses the google cloud module and can't work without it.
Skip the test if the module is unavailable.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
---
 tests/test-gcs.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/test-gcs.sh b/tests/test-gcs.sh
index ed823377dc5a..9b165e8159be 100755
--- a/tests/test-gcs.sh
+++ b/tests/test-gcs.sh
@@ -40,6 +40,7 @@ requires $PYTHON --version
 requires_nbdcopy
 requires_plugin python
 skip_if_valgrind "because Python code leaks memory"
+requires $PYTHON -c 'import google.cloud'
 
 # Skip this test if the real google-cloud-storage module is installed,
 # since that module abuses pth files to insert itself into the module

base-commit: ffa62d30fe6dcd29ae8e20df5c86d48505550614
-- 
2.44.0