File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ def check_wait_for_all_nodes_started_output(output):
163163 )
164164
165165
166- def status_topology ():
166+ def status_topology () -> dict :
167167 """
168168 Get status for a topology.
169169 """
@@ -176,7 +176,7 @@ def status_topology():
176176 return status
177177
178178
179- def status_node (node_type , node_name ) :
179+ def status_node (node_type : str , node_name : str ) -> dict :
180180 """
181181 Get status for a node.
182182 """
Original file line number Diff line number Diff line change 1+ """
2+ Test share storage at hubs.
3+ """
4+
5+ import sys
6+ import pytest
7+ from . import system_test_common
8+
9+
10+ @pytest .fixture (autouse = True )
11+ def setup_and_teardown ():
12+ """
13+ Setup and teardown for each test.
14+ """
15+ system_test_common .start_topology ()
16+ yield
17+ system_test_common .stop_topology ()
18+
19+
20+ def test_get_key_creates_shares_on_hubs ():
21+ """
22+ Test that getting a key on the master client results in shares being created on the hubs.
23+ """
24+ key_id = system_test_common .get_key ("sam" , "sofia" )
25+ status = system_test_common .status_node ("hub" , "hank" )
26+ assert "shares" in status
27+ shares = status ["shares" ]
28+ assert len (shares ) == 1
29+ share = shares [0 ]
30+ assert share ["key_id" ] == key_id
31+ assert share ["master_sae_id" ] == "sam"
32+ assert share ["slave_sae_id" ] == "sofia"
33+ assert share ["share_index" ] == 0
You can’t perform that action at this time.
0 commit comments