test(rack): cover off-rack peer (styled, not clickable) in network graph
This commit is contained in:
parent
d3d5e9c69e
commit
e1c05a6c88
1 changed files with 11 additions and 0 deletions
|
|
@ -725,3 +725,14 @@ def test_network_graph_colors_and_links_nodes():
|
|||
assert "style sw01 fill:" in out
|
||||
assert 'click sw01 "/hardware/sw01/"' in out
|
||||
assert 'click srv01 "/hardware/srv01/"' in out
|
||||
|
||||
|
||||
def test_network_graph_off_rack_peer_has_no_click():
|
||||
items = [
|
||||
item(hostname="srv01", rack_u=1, u_height=1, rack_face="front",
|
||||
links=[{"local": "eth0", "peer": "router0", "peer_port": 1}]),
|
||||
]
|
||||
out = gen_rack.render_network("rack01", items)
|
||||
assert "style router0 fill:" in out # off-rack peer is still colored
|
||||
assert 'click router0 "' not in out # but it is NOT clickable
|
||||
assert 'click srv01 "/hardware/srv01/"' in out
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue