[elbe-devel] [PATCH 4/4] tests: test the functionality of prjrepo upload_pkg
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Fri Jul 19 14:17:46 CEST 2024
Make sure that the subcommands works.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
elbepack/tests/test_xml.py | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/elbepack/tests/test_xml.py b/elbepack/tests/test_xml.py
index c1c3200b4360..ddff4cf998b6 100644
--- a/elbepack/tests/test_xml.py
+++ b/elbepack/tests/test_xml.py
@@ -2,6 +2,7 @@
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2020 Linutronix GmbH
+import pathlib
import subprocess
import pytest
@@ -10,6 +11,9 @@ from elbepack.directories import run_elbe
from elbepack.tests import parametrize_xml_test_files, xml_test_files
+here = pathlib.Path(__file__).parent
+
+
@pytest.fixture(scope='module')
def initvm(tmp_path_factory, request):
if request.config.getoption('--elbe-use-existing-initvm'):
@@ -89,3 +93,14 @@ def test_pbuilder_build(initvm, xml, tmp_path, request):
b'libgpio1-dbgsym_3.0.0_amd64.deb\n'
b'libgpio1_3.0.0_amd64.deb\n'
)
+
+ run_elbe(['prjrepo', 'upload_pkg', uuid, here / 'equivs-dummy_1.0_all.deb'], check=True)
+
+ ps = run_elbe(['prjrepo', 'list_packages', uuid], check=True, capture_output=True)
+ assert ps.stdout == (
+ b'equivs-dummy_1.0_all.deb\n'
+ b'gpiotest_1.0_amd64.deb\n'
+ b'libgpio-dev_3.0.0_amd64.deb\n'
+ b'libgpio1-dbgsym_3.0.0_amd64.deb\n'
+ b'libgpio1_3.0.0_amd64.deb\n'
+ )
--
2.45.2
More information about the elbe-devel
mailing list