Skip to content

Commit

Permalink
Finalize interop testing
Browse files Browse the repository at this point in the history
  • Loading branch information
brunorijsman committed Aug 16, 2018
1 parent 80a2e55 commit dade650
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 25 deletions.
4 changes: 3 additions & 1 deletion doc/ztp-interop-testing-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ A few issues were discussed in detail on the RIFT mailing list:

* [More than 2 RIFT neighbors on a LAN causes a storm of LIE messages.](https://mailarchive.ietf.org/arch/msg/rift/k0_nvTMdxHlFQe2PEwevdsA_tSI)

* [Clarify the expected value of the not_a_ztp_offer flag for a sending RIFT node.](https://mailarchive.ietf.org/arch/browse/rift/?index=LgJcv-_JFK5Ixho79Mjwm_vtYD8&gbt=1)
* [Clarify the expected value of the not\_a\_ztp\_offer flag for a sending RIFT node.](https://mailarchive.ietf.org/arch/browse/rift/?index=LgJcv-_JFK5Ixho79Mjwm_vtYD8&gbt=1)

For this last issue (when to send not\_a\_ztp\_offer = true), we have not yet reached what I consider to be full resolution on the RIFT mailing list. For now, I have modified my test cases to accept both the RIFT-Python behavior and also the RIFT-Juniper behavior. The specific test cases have been labeled with the comment `# TODO: Juniper lenient`

### Github Issues

Expand Down
2 changes: 1 addition & 1 deletion tests/interop.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def run_test_case(test, config, juniper_nodes, results_dir):
pytest_process, pytest_log_file = start_pytest(test, juniper_nodes, test_results_dir)
success = pytest_process.wait() == 0
result = "Pass" if success else "Fail"
print("Pass")
print(result)
juniper_process.kill()
juniper_log_file.close()
pytest_log_file.close()
Expand Down
1 change: 1 addition & 0 deletions tests/rift_expect_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def table_expect(self, pattern, timeout=expect_timeout):
pattern = pattern.replace(" |", " +|")
# The | character is a literal end-of-cell, not a regexp OR
pattern = pattern.replace("|", "[|]")
pattern = pattern.replace("/", "|")
return self.expect(pattern, timeout)

def wait_prompt(self, node_name=None):
Expand Down
6 changes: 3 additions & 3 deletions tests/test_sys_2n_l0_l1.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ def check_rift_node1_intf_up(res):
interface="if1",
system_id="2",
level=0,
not_a_ztp_offer=False,
not_a_ztp_offer="(False/True)", # TODO: Juniper lenient
state="THREE_WAY",
best=False,
best_3way=False,
removed=True,
removed_reason="Level is leaf")
removed_reason="(Level is leaf/Not a ZTP offer flag set)") # TODO: Juniper lenient
res.check_tx_offer(
node="node1",
interface="if1",
Expand All @@ -75,7 +75,7 @@ def check_rift_node1_intf_down(res):
interface="if1",
system_id="2",
level=0,
not_a_ztp_offer=False,
not_a_ztp_offer="(False/True)", # TODO: Juniper lenient
state="THREE_WAY",
best=False,
best_3way=False,
Expand Down
6 changes: 3 additions & 3 deletions tests/test_sys_2n_l0_l2.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ def check_rift_node1_intf_up(res):
interface="if1",
system_id="2",
level=0,
not_a_ztp_offer=False,
not_a_ztp_offer="(False/True)", # TODO: Juniper lenient
state="THREE_WAY",
best=False,
best_3way=False,
removed=True,
removed_reason="Level is leaf")
removed_reason="(Level is leaf/Not a ZTP offer flag set)") # TODO: Juniper lenient
res.check_tx_offer(
node="node1",
interface="if1",
Expand Down Expand Up @@ -82,7 +82,7 @@ def check_rift_node1_intf_down(res):
interface="if1",
system_id="2",
level=0,
not_a_ztp_offer=False,
not_a_ztp_offer="(False/True)", # TODO: Juniper lenient
state="THREE_WAY",
best=False,
best_3way=False,
Expand Down
25 changes: 8 additions & 17 deletions tests/test_sys_3n_l0_l1_l2.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,7 @@
#
# See topology 3n_l0_l1_l2.yaml
#
# TODO: Update this
# We test the following:
# * Bring the topology up
# * The CLI reports that adjacency reaches state 3-way on both nodes
# * The expected FSM transitions to reach state 3-way occur on both nodes
# * Fail interface if1 on node1 (bi-directional failure)
# * The CLI on node1 reports that the adjaceny to node2 is in state 2-way
# * The CLI on node2 reports that the adjaceny to node2 is in state 1-way
# TODO: Add description

# Allow long test names
# pylint: disable=invalid-name
Expand All @@ -27,12 +20,12 @@ def check_rift_node1_intf_up(res):
interface="if1",
system_id="2",
level=1,
not_a_ztp_offer=False,
not_a_ztp_offer="(False/True)", # TODO: Juniper lenient
state="THREE_WAY",
best=True,
best_3way=True,
removed=False,
removed_reason="")
best="(True/False)", # TODO: Juniper lenient
best_3way="(True/False)", # TODO: Juniper lenient
removed="(False/True)", # TODO: Juniper lenient
removed_reason="(Level is leaf/Not a ZTP offer flag set/)") # TODO: Juniper lenient
res.check_tx_offer(
node="node1",
interface="if1",
Expand All @@ -43,8 +36,8 @@ def check_rift_node1_intf_up(res):
res.check_level(
node="node1",
configured_level=2,
hal=1,
hat=1,
hal="(1/None)", # TODO: Juniper lenient
hat="(1/None)", # TODO: Juniper lenient
level_value=2)

def check_rift_node1_intf_down(res):
Expand Down Expand Up @@ -150,5 +143,3 @@ def test_3n_l0_l1_l2():
# TODO: add test cases for bringing interface node2-node3 down
# Done
res.stop()
# Check FSM
# TODO: Check FSM transitions after interface failure

0 comments on commit dade650

Please sign in to comment.