summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Schmaus <flow@gentoo.org>2024-04-16 08:59:57 +0200
committerFlorian Schmaus <flow@gentoo.org>2024-04-16 09:04:18 +0200
commit0375a7b2b589d7ffe2b73a3426d8c0abd4f4b38e (patch)
tree634f558da2d588a265b7d93e34ab18ea68e26a31 /net-analyzer/greenbone-feed-sync
parentnet-analyzer/greenbone-feed-sync: add 24.3.0 (diff)
downloadgentoo-0375a7b2b589d7ffe2b73a3426d8c0abd4f4b38e.tar.gz
gentoo-0375a7b2b589d7ffe2b73a3426d8c0abd4f4b38e.tar.bz2
gentoo-0375a7b2b589d7ffe2b73a3426d8c0abd4f4b38e.zip
net-analyzer/greenbone-feed-sync: drop config file patching in src_test
It turns out that, first, this is not necessary. At least I do not get sandbox violations in src_test(). Second, it was broken anyways, as it used $TARGET which is not defined in src_test() (only in python_test()). Also drop the "${WORKDIR}/${P}" part used in the sed, simply exploit the fact that we are in "${WORKDIR}/${P}" at this moment and use a relative path. Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'net-analyzer/greenbone-feed-sync')
-rw-r--r--net-analyzer/greenbone-feed-sync/greenbone-feed-sync-24.3.0.ebuild14
1 files changed, 1 insertions, 13 deletions
diff --git a/net-analyzer/greenbone-feed-sync/greenbone-feed-sync-24.3.0.ebuild b/net-analyzer/greenbone-feed-sync/greenbone-feed-sync-24.3.0.ebuild
index b4e72dcf6899..8bf819ca6397 100644
--- a/net-analyzer/greenbone-feed-sync/greenbone-feed-sync-24.3.0.ebuild
+++ b/net-analyzer/greenbone-feed-sync/greenbone-feed-sync-24.3.0.ebuild
@@ -36,15 +36,6 @@ RDEPEND="
distutils_enable_tests unittest
src_test() {
- # Make a copy of the original config
- cp "${WORKDIR}/${P}/greenbone/feed/sync/config.py" "${WORKDIR}/${P}/greenbone/feed/sync/config.py.orig" || die
-
- # Patch the config.py to avoid sandbox violation.
- sed -i \
- -e 's:DEFAULT_CONFIG_FILE = "/etc/gvm/greenbone-feed-sync.toml":DEFAULT_CONFIG_FILE = "'"${WORKDIR}/${P}-${TARGET}"'/install/etc/gvm/greenbone-feed-sync.toml":' \
- -e 's:DEFAULT_ENTERPRISE_KEY_PATH = "/etc/gvm/greenbone-enterprise-feed-key":DEFAULT_ENTERPRISE_KEY_PATH = "'"${WORKDIR}/${P}-${TARGET}"'/install/etc/gvm/greenbone-enterprise-feed-key":' \
- "${WORKDIR}/${P}/greenbone/feed/sync/config.py" || die
-
# Disable tests that require network access.
sed -i \
-e 's:test_do_not_run_as_root:_&:' \
@@ -54,12 +45,9 @@ src_test() {
-e 's:test_sync_nvts_verbose:_&:' \
-e 's:test_sync_nvts:_&:' \
-e 's:test_sync_nvts_error:_&:' \
- "${WORKDIR}/${P}"/tests/test_main.py || die
+ tests/test_main.py || die
distutils-r1_src_test
-
- # Restore config.py after test.
- mv "${WORKDIR}/${P}/greenbone/feed/sync/config.py.orig" "${WORKDIR}/${P}/greenbone/feed/sync/config.py" || die
}
python_install() {