2 Documentation Test suite to verify Behaviour in different topologies
3 Suite Setup Setup SXP Environment 6
4 Suite Teardown Clean SXP Environment 6
5 Test Teardown Clean Nodes
6 Library RequestsLibrary
8 Library ../../../libraries/Sxp.py
9 Resource ../../../libraries/SxpLib.robot
15 [Documentation] Test behaviour after shutting down connections in Version4
17 Setup Topology Triangel version4
18 Wait Until Keyword Succeeds 4 1 Check Export Part One
19 Delete Connections 127.0.0.1 64999 127.0.0.3
20 Delete Connections 127.0.0.3 64999 127.0.0.1
21 Wait Until Keyword Succeeds 4 1 Check Export Part Two
22 Delete Connections 127.0.0.1 64999 127.0.0.2
23 Delete Connections 127.0.0.2 64999 127.0.0.1
24 Wait Until Keyword Succeeds 4 1 Check Export Part Three
27 [Documentation] Test behaviour after shutting down connections in Legacy versions
29 @{list} = Create List version1
30 : FOR ${version} IN @{list}
31 \ Setup Topology Triangel ${version}
32 \ Wait Until Keyword Succeeds 4 1 Check Export Part One
33 \ Delete Connections 127.0.0.1 64999 127.0.0.3
34 \ Delete Connections 127.0.0.3 64999 127.0.0.1
35 \ Wait Until Keyword Succeeds 4 1 Check Export Part Two
36 \ Delete Connections 127.0.0.1 64999 127.0.0.2
37 \ Delete Connections 127.0.0.2 64999 127.0.0.1
38 \ Wait Until Keyword Succeeds 4 1 Check Export Part Three
41 Forwarding Test V2=>V1
42 [Documentation] Version 2 => 1 functionality
44 Setup Topology Linear version2 version1
45 Wait Until Keyword Succeeds 4 1 Check Forwarding V2=>V1
47 Forwarding Test V3=>V2
48 [Documentation] Version 3 => 2 functionality
50 Setup Topology Linear version3 version2
51 Wait Until Keyword Succeeds 4 1 Check Forwarding V3=>V2
53 Forwarding Test V4=>V3
54 [Documentation] Version 4 => 3 functionality
56 Setup Topology Linear version4 version3
57 Wait Until Keyword Succeeds 4 1 Check Forwarding V4=>V3
60 [Documentation] Most Recent Rule
62 Setup Topology Fork version4
63 Add Binding 542 5.5.5.5/32 127.0.0.2
65 Add Binding 543 5.5.5.5/32 127.0.0.3
66 Add Binding 100 15.15.15.15/32 127.0.0.3
68 Add Binding 99 15.15.15.15/32 127.0.0.2
69 Wait Until Keyword Succeeds 4 1 Check Most Recent
72 [Documentation] Shorthes Path over Most Recent
74 Add Connection version4 listener 127.0.0.5 64999 127.0.0.3
75 Add Connection version4 speaker 127.0.0.3 64999 127.0.0.5
76 Wait Until Keyword Succeeds 15 1 Verify Connection version4 listener 127.0.0.5
78 Setup Topology Fork version4
79 Add Binding 542 5.5.5.5/32 127.0.0.2
80 Add Binding 545 5.5.5.5/32 127.0.0.5
81 Add Binding 99 15.15.15.15/32 127.0.0.2
82 Add Binding 9954 105.15.125.15/32 127.0.0.5
83 Add Binding 95 15.15.15.15/32 127.0.0.5
84 Wait Until Keyword Succeeds 4 1 Check Shorthest Path
87 Setup Topology Triangel
88 [Arguments] ${version}
89 [Documentation] Setup 3 nodes connected to each other
90 Add Binding 542 5.5.5.5/32 127.0.0.2
91 Add Binding 543 5.5.5.5/32 127.0.0.3
92 Add Binding 99 15.15.15.15/32 127.0.0.3
93 Add Connection ${version} listener 127.0.0.2 64999 127.0.0.1
94 Add Connection ${version} speaker 127.0.0.1 64999 127.0.0.2
95 Wait Until Keyword Succeeds 15 1 Verify Connection ${version} listener 127.0.0.2
97 Add Connection ${version} listener 127.0.0.3 64999 127.0.0.1
98 Add Connection ${version} speaker 127.0.0.1 64999 127.0.0.3
99 Wait Until Keyword Succeeds 15 1 Verify Connection ${version} listener 127.0.0.3
100 Add Connection ${version} listener 127.0.0.3 64999 127.0.0.2
101 Add Connection ${version} speaker 127.0.0.2 64999 127.0.0.3
102 Wait Until Keyword Succeeds 15 1 Verify Connection ${version} speaker 127.0.0.2
105 Setup Topology Linear
106 [Arguments] ${version} ${r_version}
107 [Documentation] Setup 3 nodes connected linearly
108 Add Binding 6 56.56.56.0/24 127.0.0.2
109 Add Binding 66 9.9.9.9/32 127.0.0.2
110 Add Binding 666 2001:db8:0:0:0:0:1428:57ab/128 127.0.0.2
111 Add Binding 555 2001:db8:85a3:8d3:0:0:0:0/64 127.0.0.2
112 Add Connection ${version} listener 127.0.0.2 64999 127.0.0.1
113 Add Connection ${version} speaker 127.0.0.1 64999 127.0.0.2
114 Wait Until Keyword Succeeds 15 1 Verify Connection ${version} listener 127.0.0.2
115 Add Connection ${r_version} speaker 127.0.0.3 64999 127.0.0.1
116 Add Connection ${r_version} listener 127.0.0.1 64999 127.0.0.3
117 Wait Until Keyword Succeeds 15 1 Verify Connection ${r_version} speaker 127.0.0.3
120 [Arguments] ${version}
121 [Documentation] Setup 4 nodes in to T topology
122 Add Connection ${version} speaker 127.0.0.1 64999 127.0.0.3
123 Add Connection ${version} listener 127.0.0.3 64999 127.0.0.1
124 Wait Until Keyword Succeeds 15 1 Verify Connection ${version} listener 127.0.0.3
125 Add Connection ${version} speaker 127.0.0.1 64999 127.0.0.2
126 Add Connection ${version} listener 127.0.0.2 64999 127.0.0.1
127 Wait Until Keyword Succeeds 15 1 Verify Connection ${version} listener 127.0.0.2
128 Add Connection ${version} speaker 127.0.0.4 64999 127.0.0.1
129 Add Connection ${version} listener 127.0.0.1 64999 127.0.0.4
130 Wait Until Keyword Succeeds 15 1 Verify Connection ${version} speaker 127.0.0.4
132 Check Export Part One
133 [Documentation] Checks if Bindings 542 5.5.5.5/32 is replaced by 543 5.5.5.5/32
136 Should Contain Binding ${resp} 543 5.5.5.5/32
137 Should Not Contain Binding ${resp} 542 5.5.5.5/32
138 Should Contain Binding ${resp} 99 15.15.15.15/32
140 Check Export Part Two
141 [Documentation] Checks if Bindings 542 5.5.5.5/32 was updated after peer shutdown
144 Should Not Contain Binding ${resp} 543 5.5.5.5/32
145 Should Contain Binding ${resp} 542 5.5.5.5/32
146 Should Contain Binding ${resp} 99 15.15.15.15/32
148 Check Export Part Three
149 [Documentation] Checks if database is empty after peers shutdown
152 Should Not Contain Binding ${resp} 542 5.5.5.5/32
153 Should Not Contain Binding ${resp} 99 15.15.15.15/32
155 Check Forwarding V2=>V1
156 [Documentation] Check if appropriate bindings are exported per version
158 Should Not Contain Binding ${resp} 6 56.56.56.0/24 sxp
159 Should Contain Binding ${resp} 66 9.9.9.9/32 sxp
160 Should Contain Binding ${resp} 666 2001:db8:0:0:0:0:1428:57ab/128 sxp
161 Should Not Contain Binding ${resp} 555 2001:db8:85a3:8d3:0:0:0:0/64 sxp
163 ${resp} Get Bindings 127.0.0.3
164 Should Not Contain Binding ${resp} 6 56.56.56.0/24 sxp
165 Should Contain Binding ${resp} 66 9.9.9.9/32 sxp
166 Should Not Contain Binding ${resp} 666 2001:db8:0:0:0:0:1428:57ab/128 sxp
167 Should Not Contain Binding ${resp} 555 2001:db8:85a3:8d3:0:0:0:0/64 sxp
170 Check Forwarding V3=>V2
171 [Documentation] Check if appropriate bindings are exported per version
173 Should Contain Binding ${resp} 6 56.56.56.0/24 sxp
174 Should Contain Binding ${resp} 66 9.9.9.9/32 sxp
175 Should Contain Binding ${resp} 666 2001:db8:0:0:0:0:1428:57ab/128 sxp
176 Should Contain Binding ${resp} 555 2001:db8:85a3:8d3:0:0:0:0/64 sxp
178 ${resp} Get Bindings 127.0.0.3
179 Should Not Contain Binding ${resp} 6 56.56.56.0/24 sxp
180 Should Contain Binding ${resp} 66 9.9.9.9/32 sxp
181 Should Contain Binding ${resp} 666 2001:db8:0:0:0:0:1428:57ab/128 sxp
182 Should Not Contain Binding ${resp} 555 2001:db8:85a3:8d3:0:0:0:0/64 sxp
185 Check Forwarding V4=>V3
186 [Documentation] Check if appropriate bindings are exported per version
188 Should Contain Binding ${resp} 6 56.56.56.0/24
189 Should Contain Binding ${resp} 66 9.9.9.9/32
190 Should Contain Binding ${resp} 666 2001:db8:0:0:0:0:1428:57ab/128
191 Should Contain Binding ${resp} 555 2001:db8:85a3:8d3:0:0:0:0/64
193 ${resp} Get Bindings 127.0.0.3
194 Should Contain Binding ${resp} 6 56.56.56.0/24 sxp
195 Should Contain Binding ${resp} 66 9.9.9.9/32 sxp
196 Should Contain Binding ${resp} 666 2001:db8:0:0:0:0:1428:57ab/128 sxp
197 Should Contain Binding ${resp} 555 2001:db8:85a3:8d3:0:0:0:0/64 sxp
201 [Documentation] Checks if Shorthest path rule is applied onto bindings
203 Should Contain Binding ${resp} 542 5.5.5.5/32
204 Should Contain Binding ${resp} 9954 105.15.125.15/32
205 Should Contain Binding ${resp} 99 15.15.15.15/32
206 ${resp} Get Bindings 127.0.0.4
207 Should Contain Binding ${resp} 542 5.5.5.5/32
208 Should Contain Binding ${resp} 9954 105.15.125.15/32
209 Should Contain Binding ${resp} 99 15.15.15.15/32
212 [Documentation] Checks if MostRecent rule is applied onto bindings
214 Should Contain Binding ${resp} 543 5.5.5.5/32
215 Should Contain Binding ${resp} 99 15.15.15.15/32
216 ${resp} Get Bindings 127.0.0.4
217 Should Contain Binding ${resp} 543 5.5.5.5/32
218 Should Contain Binding ${resp} 99 15.15.15.15/32
221 Clean Bindings 127.0.0.1
222 Clean Bindings 127.0.0.2
223 Clean Bindings 127.0.0.3
224 Clean Bindings 127.0.0.4
225 Clean Bindings 127.0.0.5
226 Clean Connections 127.0.0.1
227 Clean Connections 127.0.0.2
228 Clean Connections 127.0.0.3
229 Clean Connections 127.0.0.4
230 Clean Connections 127.0.0.5