summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorAndrew Clayton <a.clayton@nginx.com>2024-09-06 16:28:00 +0100
committerAndrew Clayton <a.clayton@nginx.com>2024-09-10 01:12:29 +0100
commitcff5e092afec17c73a0f94d75276500fd9da8403 (patch)
tree9c9439df0846694dfd86f282afa97432aee8a98b /test
parent6976a614d782d13e14c6c8e446ce521c47f02b58 (diff)
downloadunit-cff5e092afec17c73a0f94d75276500fd9da8403.tar.gz
unit-cff5e092afec17c73a0f94d75276500fd9da8403.tar.bz2
tests: Suppress cargo-component output
Suppress the output from cargo-component when we first run it to check if it's available, otherwise you may see the following $ pytest test/test_wasm-wasi-component.py which: no go in (/home/andrew/.local/bin:/home/andrew/bin:/usr/share/Modules/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin) error: no such command: `component` View all installed commands with `cargo --list` Find a package to install `component` with `cargo search cargo-component Note: This didn't stop the tests from working, just an aesthetic issue. Closes: https://github.com/nginx/unit/issues/1410 Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
Diffstat (limited to 'test')
-rw-r--r--test/unit/applications/lang/wasm_component.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/unit/applications/lang/wasm_component.py b/test/unit/applications/lang/wasm_component.py
index 1d58afd6..a6c8dd14 100644
--- a/test/unit/applications/lang/wasm_component.py
+++ b/test/unit/applications/lang/wasm_component.py
@@ -11,7 +11,10 @@ class ApplicationWasmComponent(ApplicationProto):
@staticmethod
def prepare_env(script):
try:
- subprocess.check_output(['cargo', 'component', '--help'])
+ subprocess.check_output(
+ ['cargo', 'component', '--help'],
+ stderr=subprocess.STDOUT,
+ )
except (subprocess.CalledProcessError, FileNotFoundError):
return None