Skip to content

Commit

Permalink
- Provided all the disabled tests with the ticket references. (#176)
Browse files Browse the repository at this point in the history
- Enabled the tests testChangeNodeHaForPrimary and testChangeNodeHaForNonPrimary on non-Windows platforms.
- Commented out parametrizers at the disabled tests in plenum.test.input_validation.test_common_checks module.
  • Loading branch information
spivachuk authored and ashcherbakov committed May 29, 2017
1 parent 98848f1 commit 078acc8
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 21 deletions.
24 changes: 12 additions & 12 deletions plenum/test/input_validation/test_common_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,49 +6,49 @@
# TODO: check error messages


@pytest.mark.skip('roll away new validation logic')
@pytest.mark.parametrize('descriptor', argvalues=messages, ids=messages_names_shortcut)
@pytest.mark.skip('INDY-78. Roll away new validation logic')
# @pytest.mark.parametrize('descriptor', argvalues=messages, ids=messages_names_shortcut)
def test_message_valid(descriptor):
for m in descriptor.positive_test_cases_valid_message:
assert descriptor.klass(**m), 'Correct msg passes: {}'.format(m)


@pytest.mark.skip('roll away new validation logic')
@pytest.mark.parametrize('descriptor', argvalues=messages, ids=messages_names_shortcut)
@pytest.mark.skip('INDY-78. Roll away new validation logic')
# @pytest.mark.parametrize('descriptor', argvalues=messages, ids=messages_names_shortcut)
def test_message_missed_optional_field_pass(descriptor):
for m in descriptor.positive_test_cases_missed_optional_field:
assert descriptor.klass(**m), 'Correct msg passes: {}'.format(m)


@pytest.mark.skip('roll away new validation logic')
@pytest.mark.parametrize('descriptor', argvalues=messages, ids=messages_names_shortcut)
@pytest.mark.skip('INDY-78. Roll away new validation logic')
# @pytest.mark.parametrize('descriptor', argvalues=messages, ids=messages_names_shortcut)
def test_message_invalid_value_fail(descriptor):
for m in descriptor.negative_test_cases_invalid_value:
with pytest.raises(TypeError, message='did not raise {}'.format(m)) as exc_info:
descriptor.klass(**m)
assert exc_info.match(r'validation error: .*')


@pytest.mark.skip('roll away new validation logic')
@pytest.mark.parametrize('descriptor', argvalues=messages, ids=messages_names_shortcut)
@pytest.mark.skip('INDY-78. Roll away new validation logic')
# @pytest.mark.parametrize('descriptor', argvalues=messages, ids=messages_names_shortcut)
def test_message_missed_required_field_fail(descriptor):
for m in descriptor.negative_test_cases_missed_required_field:
with pytest.raises(TypeError, message='did not raise {}'.format(m)) as exc_info:
descriptor.klass(**m)
assert exc_info.match(r'validation error: missed fields .*')


@pytest.mark.skip('roll away new validation logic')
@pytest.mark.parametrize('descriptor', argvalues=messages, ids=messages_names_shortcut)
@pytest.mark.skip('INDY-78. Roll away new validation logic')
# @pytest.mark.parametrize('descriptor', argvalues=messages, ids=messages_names_shortcut)
def test_message_extra_field_fail(descriptor):
for m in descriptor.negative_test_cases_extra_field:
with pytest.raises(TypeError, message='did not raise {}'.format(m)) as exc_info:
descriptor.klass(**m)
assert exc_info.match(r'validation error: unknown field .*')


@pytest.mark.skip('roll away new validation logic')
@pytest.mark.parametrize('descriptor', argvalues=messages, ids=messages_names_shortcut)
@pytest.mark.skip('INDY-78. Roll away new validation logic')
# @pytest.mark.parametrize('descriptor', argvalues=messages, ids=messages_names_shortcut)
def test_message_wrong_type_fail(descriptor):
for m in descriptor.negative_test_cases_wrong_type:
with pytest.raises(TypeError, message='did not raise {}'.format(m)) as exc_info:
Expand Down
4 changes: 2 additions & 2 deletions plenum/test/input_validation/test_handle_one_node_message.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest


@pytest.mark.skip('Implement')
@pytest.mark.skip('INDY-79. Implement')
def test_empty_args_fail(testNode):
before_msg = len(testNode.nodeInBox)
while pytest.raises(AssertionError):
Expand All @@ -10,7 +10,7 @@ def test_empty_args_fail(testNode):
'nodeInBox has not got a message'


@pytest.mark.skip('Implement')
@pytest.mark.skip('INDY-79. Implement')
def test_too_many_args_fail(testNode):
before_msg = len(testNode.nodeInBox)
testNode.handleOneNodeMsg(({}, 'otherNone', 'extra_arg'))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
nodeCount = 7


@pytest.mark.skip(reason="Not yet implemented")
@pytest.mark.skip(reason="INDY-80. Not yet implemented")
def testMultipleInstanceChangeMsgsMarkNodeAsSuspicious(looper, nodeSet, up):
maliciousNode = nodeSet.Alpha
for i in range(0, 5):
Expand Down
2 changes: 1 addition & 1 deletion plenum/test/script/test_change_non_primary_node_ha.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
'got error while verifying message']


@pytest.mark.skip(reason='SOV-330')
@pytest.mark.skipif('sys.platform == "win32"', reason='SOV-330')
def testChangeNodeHaForNonPrimary(looper, txnPoolNodeSet, tdirWithPoolTxns,
poolTxnData, poolTxnStewardNames, tconf):

Expand Down
2 changes: 1 addition & 1 deletion plenum/test/script/test_change_primary_node_ha.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
'got error while verifying message']


@pytest.mark.skip(reason='SOV-330')
@pytest.mark.skipif('sys.platform == "win32"', reason='SOV-330')
def testChangeNodeHaForPrimary(looper, txnPoolNodeSet, tdirWithPoolTxns,
poolTxnData, poolTxnStewardNames, tconf):
changeNodeHa(looper,
Expand Down
2 changes: 1 addition & 1 deletion plenum/test/test_node_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def tdirAndLooper(nodeReg):
yield td, looper


@pytest.mark.skip()
@pytest.mark.skip(reason='INDY-75')
def testNodesConnectsWhenOneNodeIsLate(allPluginsPath, tdirAndLooper,
nodeReg):
tdir, looper = tdirAndLooper
Expand Down
4 changes: 2 additions & 2 deletions plenum/test/test_node_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ async def checkIfPropagateRecvdFromNode(recvrNode: TestNode,


# noinspection PyIncorrectDocstring
@pytest.mark.skip(reason="ZStack does not have any mechanism to have stats "
"either remove this once raet is removed "
@pytest.mark.skip(reason="INDY-76. ZStack does not have any mechanism to have "
"stats either remove this once raet is removed "
"or implement a `stats` feature in ZStack")
def testMultipleRequests(tdir_for_func):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

# TODO: This test needs to be implemented
# noinspection PyIncorrectDocstring
@pytest.mark.skip()
@pytest.mark.skip(reason='INDY-84. Complete implementation')
def testQueueingReqFromFutureView(delayed_perf_chk, looper, nodeSet, up,
wallet1, client1):
"""
Expand Down

0 comments on commit 078acc8

Please sign in to comment.