diff options
author | Jack Morgan <jack.morgan@intel.com> | 2016-10-25 11:45:14 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2016-10-25 11:45:14 +0000 |
commit | 026ae4994e15809d25bf9f62e36f6fe5b35b1542 (patch) | |
tree | 83d6f0bb4ee1594b3016ab67696af0f1acdb4d94 /pharos-validator/src/validation_tool/tests | |
parent | 61f00f4110b1d33827e3bd19ffef34f10be8273a (diff) | |
parent | 4f0ecb702a601d122f261a134007377435e4aca1 (diff) |
Merge "Add pharos-validator tool"
Diffstat (limited to 'pharos-validator/src/validation_tool/tests')
4 files changed, 21 insertions, 0 deletions
diff --git a/pharos-validator/src/validation_tool/tests/test_node.py b/pharos-validator/src/validation_tool/tests/test_node.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/pharos-validator/src/validation_tool/tests/test_node.py diff --git a/pharos-validator/src/validation_tool/tests/test_probe.py b/pharos-validator/src/validation_tool/tests/test_probe.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/pharos-validator/src/validation_tool/tests/test_probe.py diff --git a/pharos-validator/src/validation_tool/tests/test_server.py b/pharos-validator/src/validation_tool/tests/test_server.py new file mode 100644 index 0000000..35388b6 --- /dev/null +++ b/pharos-validator/src/validation_tool/tests/test_server.py @@ -0,0 +1,9 @@ +#!/usr/bin/env python3 + +def test_ssh_thread(): + """Test to see if ssh connections are attempted the proper amount of times""" + from pharosvalidator.server import ssh_thread + ssh_thread("127.0.0.1", "0.0.0.0", "1", 10) + + + diff --git a/pharos-validator/src/validation_tool/tests/test_util.py b/pharos-validator/src/validation_tool/tests/test_util.py new file mode 100644 index 0000000..9ce939b --- /dev/null +++ b/pharos-validator/src/validation_tool/tests/test_util.py @@ -0,0 +1,12 @@ +#!/usr/bin/env python3 + +import random + +def test_approxsize(): + from pharosvalidator.util import approxsize + assert approxsize(100, 95, 5) == True + assert approxsize(100, 105, 5) == True + + assert approxsize(100, 94, 5) == False + assert approxsize(100, 106, 5) == False + |