summaryrefslogtreecommitdiff
path: root/tests/accel-cmd/test_cmd_basic.py
diff options
context:
space:
mode:
authorxebd <xeb@mail.ru>2022-09-12 10:56:47 +0300
committerGitHub <noreply@github.com>2022-09-12 10:56:47 +0300
commit28fe4de9441aa9d0c42c010e8eef5b1a19122c9d (patch)
treeecefcafbeb9c9610ed3cf8c30a238b9168bba3bb /tests/accel-cmd/test_cmd_basic.py
parent25c72614bf8106b0e4f71e2bce70514b03858463 (diff)
parent127b1de95923fccdfdc892c20f931d364e099f4b (diff)
downloadaccel-ppp-28fe4de9441aa9d0c42c010e8eef5b1a19122c9d.tar.gz
accel-ppp-28fe4de9441aa9d0c42c010e8eef5b1a19122c9d.zip
Merge pull request #61 from svlobanov/tests2
add tests and ci workflow for running tests
Diffstat (limited to 'tests/accel-cmd/test_cmd_basic.py')
-rw-r--r--tests/accel-cmd/test_cmd_basic.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/accel-cmd/test_cmd_basic.py b/tests/accel-cmd/test_cmd_basic.py
new file mode 100644
index 00000000..c6cdc7ae
--- /dev/null
+++ b/tests/accel-cmd/test_cmd_basic.py
@@ -0,0 +1,26 @@
+import pytest
+from common import process
+
+
+def test_accel_cmd_version(accel_cmd):
+ (exit, out, err) = process.run([accel_cmd, "--version"])
+
+ # test that accel-cmd --version exits with code 0, prints
+ # nothing to stdout and prints to stdout
+ assert exit == 0 and err == "" and "accel-cmd " in out and len(out.split(" ")) == 2
+
+
+def test_accel_cmd_non_existent_host(accel_cmd):
+ (exit, out, err) = process.run([accel_cmd, "-Hnon-existent-host", "--verbose"])
+
+ # test that accel-cmd (tried to connecto to non-existent host) exits with code != 0,
+ # prints nothing to stdout and prints an error to stderr
+ assert exit != 0 and out == "" and err != ""
+
+
+def test_accel_cmd_mcast_host(accel_cmd):
+ (exit, out, err) = process.run([accel_cmd, "-H225.0.0.1"])
+
+ # test that accel-cmd (tried to connecto to mcast host) exits with code != 0,
+ # prints nothing to stdout and prints an error to stderr
+ assert exit != 0 and out == "" and err != ""