Yeela Kaplan has uploaded a new change for review.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
vdscliTests: add a test for connect with a timeout
Change-Id: I21793986338a00caa1163c7f9297d160a9d1fc45 Signed-off-by: Yeela Kaplan ykaplan@redhat.com --- M tests/vdsClientTests.py 1 file changed, 19 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/06/38806/1
diff --git a/tests/vdsClientTests.py b/tests/vdsClientTests.py index 3556018..c928f98 100644 --- a/tests/vdsClientTests.py +++ b/tests/vdsClientTests.py @@ -23,9 +23,10 @@ import sys from tempfile import mkstemp from contextlib import contextmanager +from _ssl import SSLError
from testlib import VdsmTestCase as TestCaseBase -from testValidation import brokentest +from testValidation import brokentest, ValidateRunningAsRoot from monkeypatch import MonkeyPatch
from vdsm import vdscli @@ -521,6 +522,23 @@ 'key3': 'val3'})
+class ConnectTest(TestCaseBase): + + @ValidateRunningAsRoot + def testTimeout(self): + c = vdscli.connect(useSSL=True, + tsPath='/etc/pki/vdsm', + timeout=0.01) + self.assertRaises(SSLError, c.getVdsStats) + + @ValidateRunningAsRoot + def testNoTimeout(self): + c = vdscli.connect(useSSL=True, + tsPath='/etc/pki/vdsm', + timeout=3) + self.assertNotRaises(c.getVdsStats) + + class CannonizeHostPortTest(TestCaseBase):
def testNoArguments(self):
automation@ovirt.org has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 1:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
Yaniv Bronhaim has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 1: Code-Review-1
We should move it to be as part of infra functional tests. It requires running vdsm
Dan Kenigsberg has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 1:
(2 comments)
https://gerrit.ovirt.org/#/c/38806/1/tests/vdsClientTests.py File tests/vdsClientTests.py:
Line 524: Line 525: class ConnectTest(TestCaseBase): Line 526: Line 527: @ValidateRunningAsRoot Line 528: def testTimeout(self): indeed - it should be moved to the "functional" subdir. Line 529: c = vdscli.connect(useSSL=True, Line 530: tsPath='/etc/pki/vdsm', Line 531: timeout=0.01) Line 532: self.assertRaises(SSLError, c.getVdsStats)
Line 525: class ConnectTest(TestCaseBase): Line 526: Line 527: @ValidateRunningAsRoot Line 528: def testTimeout(self): Line 529: c = vdscli.connect(useSSL=True, why specific useSSL explicitly? the currently-running vdsmd may use plaintext. Line 530: tsPath='/etc/pki/vdsm', Line 531: timeout=0.01) Line 532: self.assertRaises(SSLError, c.getVdsStats) Line 533:
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 1:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/16773/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/16945/ : FAILURE
automation@ovirt.org has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 2:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 2:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/16828/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/17000/ : SUCCESS
automation@ovirt.org has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 3:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 3:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/16830/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/17002/ : SUCCESS
automation@ovirt.org has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 4:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 4:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/16832/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/17004/ : SUCCESS
Yeela Kaplan has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 4: Verified+1
automation@ovirt.org has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 5:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 5:
Build Started (1/2) -> http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/16899/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 5:
Build Started (2/2) -> http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/17071/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 5:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/16899/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/17071/ : SUCCESS
automation@ovirt.org has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 6:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 6:
Build Started (1/2) -> http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/16987/
automation@ovirt.org has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 7:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 7:
Build Started (1/2) -> http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/16989/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 6:
Build Started (2/2) -> http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/17161/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 6:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/16987/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/17161/ : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 7:
Build Started (2/2) -> http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/17163/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 7:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/16989/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/17163/ : SUCCESS
Yaniv Bronhaim has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 7: Code-Review-1
the job that runs the tests is - http://jenkins.ovirt.org/view/zz%20-%20Gerrit%20patches%20jobs/view/vdsm/job... -> we need to add those tests to it. but before adding that we need to fix the errors we have there currently.
Yaniv Bronhaim has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 7: Code-Review+1
this can be merged before infra functional tests job will be fixed. we don't call it anyhow
automation@ovirt.org has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 8:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 8:
Build Started (1/2) -> http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/17079/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 8:
Build Started (2/2) -> http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/17253/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 8:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/17079/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/17253/ : SUCCESS
Piotr Kliczewski has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 8: Code-Review-1
(1 comment)
https://gerrit.ovirt.org/#/c/38806/8/tests/functional/vdscliTests.py File tests/functional/vdscliTests.py:
Line 26: from vdsm import vdscli Line 27: Line 28: Line 29: class ConnectTest(TestCaseBase): Line 30: We have 2 tests run for useSSL true and false. Please use permutations and get rid of code duplication. Line 31: @ValidateRunningAsRoot Line 32: def testTimeoutSafeTransport(self): Line 33: c = vdscli.connect(useSSL=True, Line 34: tsPath='/etc/pki/vdsm',
Yeela Kaplan has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 8: Verified-1
automation@ovirt.org has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 9:
* Update tracker::#1225455::OK * Check Bug-Url::OK * Check Public Bug::#1225455::OK, public bug * Check Product::#1225455::OK, Correct product oVirt * Check TR::SKIP, not in a monitored branch (ovirt-3.5 ovirt-3.4 ovirt-3.3 ovirt-3.2) * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 10:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 11:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
Yeela Kaplan has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 11: Verified+1
automation@ovirt.org has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 12:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
Yeela Kaplan has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 12: Verified+1
Piotr Kliczewski has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 12: Code-Review-1
I do not understand what we want to push certs and keys to repo. We already have utils which generate them.
automation@ovirt.org has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 13:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
Piotr Kliczewski has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 13: Code-Review-1
(4 comments)
https://gerrit.ovirt.org/#/c/38806/13/tests/Makefile.am File tests/Makefile.am:
Line 22: Line 23: SUBDIRS = \ Line 24: functional \ Line 25: devices \ Line 26: pki \ Why do we still need this change? Line 27: $(NULL) Line 28: Line 29: device_modules = \ Line 30: devices/parsing/complex_vm_tests.py \
https://gerrit.ovirt.org/#/c/38806/13/tests/pki/Makefile.am File tests/pki/Makefile.am:
Line 1: # Is this file still needed? Line 2: # Copyright 2015 Red Hat, Inc. Line 3: # Line 4: # This program is free software; you can redistribute it and/or modify Line 5: # it under the terms of the GNU General Public License as published by
https://gerrit.ovirt.org/#/c/38806/13/tests/run_tests_local.sh.in File tests/run_tests_local.sh.in:
Line 6: if [ ! -f @top_srcdir@/tests/server.crt ] || [ ! -f @top_srcdir@/tests/server.csr ] || [ ! -f @top_srcdir@/tests/server.key ] || [ ! -f @top_srcdir@/tests/other.crt ] || [ ! -f @top_srcdir@/tests/other.csr ] || [ ! -f @top_srcdir@/tests/other.key ]; then Line 7: @top_srcdir@/tests/makecert.sh Line 8: fi Line 9: Line 10: #cp @top_srcdir@/tests/server.key @top_srcdir@/tests/pki/keys/vdsmkey.pem What is the reason for these comments? Line 11: #cp @top_srcdir@/tests/server.crt @top_srcdir@/tests/pki/certs/vdsmcert.pem Line 12: #cp @top_srcdir@/tests/server.crt @top_srcdir@/tests/pki/certs/cacert.pem Line 13:
https://gerrit.ovirt.org/#/c/38806/13/vdsm.spec.in File vdsm.spec.in:
Line 1316: %defattr(-, root, root, -) Line 1317: %dir %{_datadir}/%{vdsm_name}/tests Line 1318: %dir %{_datadir}/%{vdsm_name}/tests/functional Line 1319: %dir %{_datadir}/%{vdsm_name}/tests/devices Line 1320: %dir %{_datadir}/%{vdsm_name}/tests/pki do we still need pki dir? Line 1321: %dir %{_datadir}/%{vdsm_name}/tests/pki/certs Line 1322: %dir %{_datadir}/%{vdsm_name}/tests/pki/keys Line 1323: %{_datadir}/%{vdsm_name}/tests/*.py* Line 1324: %{_datadir}/%{vdsm_name}/tests/cpu_info.out
Yeela Kaplan has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 13:
(3 comments)
https://gerrit.ovirt.org/#/c/38806/13/tests/Makefile.am File tests/Makefile.am:
Line 22: Line 23: SUBDIRS = \ Line 24: functional \ Line 25: devices \ Line 26: pki \
Why do we still need this change?
This is the vdscli path for vdsm certificates... Line 27: $(NULL) Line 28: Line 29: device_modules = \ Line 30: devices/parsing/complex_vm_tests.py \
https://gerrit.ovirt.org/#/c/38806/13/tests/pki/Makefile.am File tests/pki/Makefile.am:
Line 1: #
Is this file still needed?
It is needed because of the way vdscli works. Line 2: # Copyright 2015 Red Hat, Inc. Line 3: # Line 4: # This program is free software; you can redistribute it and/or modify Line 5: # it under the terms of the GNU General Public License as published by
https://gerrit.ovirt.org/#/c/38806/13/tests/run_tests_local.sh.in File tests/run_tests_local.sh.in:
Line 6: if [ ! -f @top_srcdir@/tests/server.crt ] || [ ! -f @top_srcdir@/tests/server.csr ] || [ ! -f @top_srcdir@/tests/server.key ] || [ ! -f @top_srcdir@/tests/other.crt ] || [ ! -f @top_srcdir@/tests/other.csr ] || [ ! -f @top_srcdir@/tests/other.key ]; then Line 7: @top_srcdir@/tests/makecert.sh Line 8: fi Line 9: Line 10: #cp @top_srcdir@/tests/server.key @top_srcdir@/tests/pki/keys/vdsmkey.pem
What is the reason for these comments?
This is a mistake, will be fixed in next patch set. thanks. Line 11: #cp @top_srcdir@/tests/server.crt @top_srcdir@/tests/pki/certs/vdsmcert.pem Line 12: #cp @top_srcdir@/tests/server.crt @top_srcdir@/tests/pki/certs/cacert.pem Line 13:
automation@ovirt.org has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 14:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
Yeela Kaplan has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 14: Verified+1
Piotr Kliczewski has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 14: Code-Review+1
Dan Kenigsberg has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 14: Code-Review+2
Dan Kenigsberg has submitted this change and it was merged.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
vdscliTests: add a test for connect with a timeout
Change-Id: I21793986338a00caa1163c7f9297d160a9d1fc45 Signed-off-by: Yeela Kaplan ykaplan@redhat.com Reviewed-on: https://gerrit.ovirt.org/38806 Continuous-Integration: Jenkins CI Reviewed-by: Piotr Kliczewski piotr.kliczewski@gmail.com Reviewed-by: Dan Kenigsberg danken@redhat.com --- M tests/Makefile.am A tests/vdscliTests.py 2 files changed, 122 insertions(+), 0 deletions(-)
Approvals: Piotr Kliczewski: Looks good to me, but someone else must approve Yeela Kaplan: Verified Jenkins CI: Passed CI tests Dan Kenigsberg: Looks good to me, approved
automation@ovirt.org has posted comments on this change.
Change subject: vdscliTests: add a test for connect with a timeout ......................................................................
Patch Set 15:
* Update tracker::IGNORE, no Bug-Url found * Set MODIFIED::IGNORE, no Bug-Url found.
vdsm-patches@lists.fedorahosted.org