[med-svn] [Git][med-team/qiime][master] Skip cache multi-user test when useradd/userdel are unavailable
Andreas Tille (@tille)
gitlab at salsa.debian.org
Mon Nov 2 12:53:06 GMT 2026
Andreas Tille pushed to branch master at Debian Med / qiime
Commits:
0a9e9f98 by Andreas Tille at 2026-11-02T13:34:46+01:00
Skip cache multi-user test when useradd/userdel are unavailable
- - - - -
2 changed files:
- debian/changelog
- debian/patches/skip-unavailable-tests.patch
Changes:
=====================================
debian/changelog
=====================================
@@ -21,6 +21,7 @@ rachis (2026.10.0-1) UNRELEASED; urgency=medium
* Set upstream metadata fields: Repository, Repository-Browse.
* cme fix dpkg-control
* Conflicts, Provides, Replaces: qiime
+ * Skip the cache multi-user test since useradd/userdel are not on PATH
-- Andreas Tille <tille at debian.org> Sun, 22 Feb 2026 13:02:47 +0100
=====================================
debian/patches/skip-unavailable-tests.patch
=====================================
@@ -3,8 +3,11 @@ Description: skip tests that cannot run in the Debian build environment
package does not install interchange.py on PATH, so these tests cannot pass.
Also skip asynchronous tests on Python 3.15, where the Debian python3-dill
cannot serialize code objects.
+ The cache multi-user test calls useradd/userdel, which are not guaranteed to
+ be on PATH (e.g. /usr/sbin) in the autopkgtest testbed; skip it in that case
+ instead of failing with an opaque "getpwnam(): name not found" KeyError.
Forwarded: not-needed
-Last-Update: 2026-11-01
+Last-Update: 2026-11-02
Assisted-By: DeepSeek V4.1 Flash Free
---
--- a/src/rachis/sdk/tests/test_usage.py
@@ -17,7 +20,7 @@ Assisted-By: DeepSeek V4.1 Flash Free
from rachis.core.testing.util import get_dummy_plugin
import rachis.core.testing.examples as examples
-@@ -467,6 +468,8 @@
+@@ -467,6 +468,8 @@ class TestExecutionUsage(TestCaseUsage):
self.assertIsInstance(ints.value, ResultCollection)
self.assertIsInstance(out.value, ResultCollection)
@@ -26,7 +29,7 @@ Assisted-By: DeepSeek V4.1 Flash Free
def test_init_artifact_from_url_error(self):
use = usage.ExecutionUsage()
-@@ -475,6 +478,8 @@
+@@ -475,6 +478,8 @@ class TestExecutionUsage(TestCaseUsage):
'bad_url_artifact',
'https://not-a-url.qiime2.org/junk.qza',)
@@ -35,7 +38,7 @@ Assisted-By: DeepSeek V4.1 Flash Free
def test_init_metadata_from_url_error(self):
use = usage.ExecutionUsage()
-@@ -493,6 +498,8 @@
+@@ -493,6 +498,8 @@ class TestExecutionUsage(TestCaseUsage):
# self.assertIsInstance(a, Artifact)
@@ -44,7 +47,7 @@ Assisted-By: DeepSeek V4.1 Flash Free
def test_init_artifact_from_url_error_on_non_artifact(self):
metadata_url = \
'https://data.qiime2.org/2022.11/tutorials/' \
-@@ -502,6 +509,8 @@
+@@ -502,6 +509,8 @@ class TestExecutionUsage(TestCaseUsage):
with self.assertRaisesRegex(ValueError, "Could not.*\n.*a QIIME arc"):
use.init_artifact_from_url('a', metadata_url)
@@ -53,7 +56,7 @@ Assisted-By: DeepSeek V4.1 Flash Free
def test_init_metadata_from_url_error_on_non_metadata(self):
url = 'https://docs.qiime2.org/'
use = usage.ExecutionUsage()
-@@ -509,6 +518,8 @@
+@@ -509,6 +518,8 @@ class TestExecutionUsage(TestCaseUsage):
with self.assertRaisesRegex(ValueError, "Could not.*\n.*nized ID"):
use.init_metadata_from_url('a', url)
@@ -72,7 +75,7 @@ Assisted-By: DeepSeek V4.1 Flash Free
import tempfile
import unittest
-@@ -214,6 +215,8 @@
+@@ -214,6 +215,8 @@ class TestConfig(unittest.TestCase):
self.assertEqual(list_execution_contexts, self.tpool_expected)
self.assertEqual(dict_execution_contexts, self.tpool_expected)
@@ -83,7 +86,7 @@ Assisted-By: DeepSeek V4.1 Flash Free
"""
--- a/src/rachis/sdk/usage.py
+++ b/src/rachis/sdk/usage.py
-@@ -1153,8 +1153,8 @@
+@@ -1153,8 +1153,8 @@ class Usage:
... 'sample-metadata.tsv')
>>> print(url)
https://data.qiime2.org/usage...
@@ -104,7 +107,7 @@ Assisted-By: DeepSeek V4.1 Flash Free
import hashlib
import shutil
import string
-@@ -320,6 +321,9 @@
+@@ -320,6 +321,9 @@ class TestCache(unittest.TestCase):
post_gc_contents = _get_cache_contents(self.cache)
self.assertEqual(expected_post_gc_contents, post_gc_contents)
@@ -114,7 +117,7 @@ Assisted-By: DeepSeek V4.1 Flash Free
def test_asynchronous(self):
concatenate_ints = self.plugin.methods['concatenate_ints']
-@@ -335,6 +339,9 @@
+@@ -335,6 +339,9 @@ class TestCache(unittest.TestCase):
observed = _get_cache_contents(self.cache)
self.assertEqual(expected, observed)
@@ -124,7 +127,7 @@ Assisted-By: DeepSeek V4.1 Flash Free
def test_asynchronous_pool(self):
concatenate_ints = self.plugin.methods['concatenate_ints']
test_pool = self.cache.create_pool(TEST_POOL)
-@@ -523,6 +530,9 @@
+@@ -523,6 +530,9 @@ class TestCache(unittest.TestCase):
# This test has zzz in front of it because unittest.Testcase runs the tests
# in alphabetical order, and we want this test to run last
@@ -134,6 +137,16 @@ Assisted-By: DeepSeek V4.1 Flash Free
def test_zzz_asynchronous_pool_post_exit(self):
"""This test determines if all of the data is still in the cache when
we are getting ready to exit. This was put here when ensuring we do not
+@@ -581,6 +591,9 @@ class TestCache(unittest.TestCase):
+ @pytest.mark.skipif(
+ os.geteuid() != 0, reason="only sudo can mess with users")
+ @pytest.mark.skipif(
++ shutil.which('useradd') is None or shutil.which('userdel') is None,
++ reason="useradd/userdel not available to create a fake user")
++ @pytest.mark.skipif(
+ platform.system() == "Darwin",
+ reason="Mac clusters not really a thing")
+ def test_multi_user(self):
--- a/src/rachis/sdk/tests/test_method.py
+++ b/src/rachis/sdk/tests/test_method.py
@@ -9,6 +9,7 @@
@@ -144,7 +157,7 @@ Assisted-By: DeepSeek V4.1 Flash Free
import unittest
import uuid
-@@ -426,6 +427,9 @@
+@@ -426,6 +427,9 @@ class TestMethod(unittest.TestCase):
self.assertEqual(result.view(list), list(range(1, 14)))
View it on GitLab: https://salsa.debian.org/med-team/qiime/-/commit/0a9e9f98da0a58206980ab95a0963b5aa87a0d04
--
View it on GitLab: https://salsa.debian.org/med-team/qiime/-/commit/0a9e9f98da0a58206980ab95a0963b5aa87a0d04
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20261102/1039fdd5/attachment-0001.htm>
More information about the debian-med-commit
mailing list