]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Test] Fix proxy test file access permission issues
authorVsevolod Stakhov <vsevolod@rspamd.com>
Mon, 20 Oct 2025 13:06:18 +0000 (14:06 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Mon, 20 Oct 2025 13:06:18 +0000 (14:06 +0100)
Use xargs to read file list instead of passing directory path directly.
This avoids permission denied errors when rspamc runs inside Docker
container and tries to read files from mounted volumes with different
user permissions.

The controller test already uses this approach successfully.

test/integration/scripts/integration-test.sh

index bd42d5097bd9cb312ae01a6da6bb1c0c4c389dc0..083136f9fd3d01312d1fc42d27beac7c0718d12c 100755 (executable)
@@ -260,9 +260,9 @@ if [ "$TEST_PROXY" = "true" ]; then
     echo ""
 
     echo "Testing via proxy worker ($PROXY_PORT)..."
-    # Use corpus directory for proxy test too
-    if ASAN_OPTIONS=detect_leaks=0 rspamc -h "$RSPAMD_HOST:$PROXY_PORT" -n "$PARALLEL" -j \
-        "$CORPUS_DIR" > "$DATA_DIR/proxy_results.json" 2> "$DATA_DIR/proxy_errors.log"; then
+    # Use same file list approach as controller test to avoid permission issues
+    if xargs -a "$DATA_DIR/shuffled_files.txt" rspamc -h "$RSPAMD_HOST:$PROXY_PORT" \
+        -n "$PARALLEL" -j > "$DATA_DIR/proxy_results.json" 2> "$DATA_DIR/proxy_errors.log"; then
         echo "✓ Proxy test complete"
         echo "Results saved to $DATA_DIR/proxy_results.json"
     else