-
Notifications
You must be signed in to change notification settings - Fork 9
/
nmtui_vlan.feature
239 lines (209 loc) · 9.71 KB
/
nmtui_vlan.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
@nmtui
Feature: VLAN TUI tests
Background:
* Prepare virtual terminal environment
@ifcfg-rh
@nmtui_vlan_add_default_connection
Scenario: nmtui - vlan - add default connection
* Prepare new connection of type "VLAN" named "vlan"
* Set "Parent" field to "eth1"
* Set "VLAN id" field to "99"
* Confirm the connection settings
Then Check ifcfg-name file created for connection "vlan"
Then "TYPE=Vlan" is visible with command "cat /etc/sysconfig/network-scripts/ifcfg-vlan"
Then "VLAN_ID=99" is visible with command "cat /etc/sysconfig/network-scripts/ifcfg-vlan"
Then "eth1.99@eth1:" is visible with command "ip a" in "10" seconds
Then "eth1.99\s+vlan" is visible with command "nmcli device"
@nmtui_vlan_set_device
Scenario: nmtui - vlan - set device
* Prepare new connection of type "VLAN" named "vlan"
* Set "Device" field to "vlan_device"
* Set "Parent" field to "eth1"
* Set "VLAN id" field to "99"
* Confirm the connection settings
Then "vlan_device@eth1:" is visible with command "ip a" in "10" seconds
Then "vlan_device\s+vlan" is visible with command "nmcli device"
@nmtui_vlan_missing_parent
Scenario: nmtui - vlan - missing parent
* Prepare new connection of type "VLAN" named "vlan"
* Set "Device" field to "vlan_device"
* Set "VLAN id" field to "99"
* Confirm the connection settings
Then ".*vlan.parent: property is not.*specified and neither is.*'802-3-ethernet:mac-address'.*" is visible on screen
#common mistake misplacing device with parent
@nmtui_vlan_set_parent_as_device
Scenario: nmtui - vlan - set parent also as device
* Prepare new connection of type "VLAN" named "vlan"
* Set "Device" field to "eth1"
* Set "Parent" field to "eth1"
* Set "VLAN id" field to "99"
* Confirm the connection settings
Then "vlan +--" is visible with command "nmcli connection"
@nmtui_vlan_set_non_existant_parent
Scenario: nmtui - vlan - set non-existant parent
* Prepare new connection of type "VLAN" named "vlan"
* Set "Device" field to "eth52.99"
* Set "Parent" field to "eth52"
* Set "VLAN id" field to "99"
* Confirm the connection settings
Then "vlan +--" is visible with command "nmcli connection"
@nmtui_vlan_autocompletion
Scenario: nmtui - vlan - autocompletion
* Prepare new connection of type "VLAN" named "vlan"
* Set "Device" field to "eth52.99"
* Ensure "Automatically connect" is checked
Then ".*Parent eth52.*" is visible on screen
Then ".*VLAN id 99.*" is visible on screen
@nmtui_vlan_invalid_ids
Scenario: nmtui - vlan - invalid ids
* Prepare new connection of type "VLAN" named "vlan"
* Set "Device" field to "vlan"
* Set "Parent" field to "eth1"
* Set "VLAN id" field to "4096"
Then Cannot confirm the connection settings
* Press "ENTER" key
* Choose to "<Add>" a connection
* Choose the connection type "VLAN"
* Set "Profile name" field to "vlan"
* Set "Device" field to "vlan"
* Set "Parent" field to "eth1"
* Set "VLAN id" field to "65536"
Then Cannot confirm the connection settings
* Press "ENTER" key
* Choose to "<Add>" a connection
* Choose the connection type "VLAN"
* Set "Profile name" field to "vlan"
* Set "Device" field to "vlan"
* Set "Parent" field to "eth1"
* Set "VLAN id" field to "string"
Then Cannot confirm the connection settings
* Press "ENTER" key
* Choose to "<Add>" a connection
* Choose the connection type "VLAN"
* Set "Profile name" field to "vlan"
* Set "Device" field to "vlan"
* Set "Parent" field to "eth1"
* Set "VLAN id" field to "99"
Then Confirm the connection settings
@nmtui_vlan_delete_connection_down
Scenario: nmtui - vlan - delete nonactive connection
* Prepare new connection of type "VLAN" named "eth1.99"
* Set "Device" field to "eth1.99"
* Ensure "Automatically connect" is not checked
* Confirm the connection settings
* "eth1.99" is not visible with command "nmcli device"
* Select connection "eth1.99" in the list
* Choose to "<Delete>" a connection
* Press "Delete" button in the dialog
Then "eth1.99" is not visible with command "nmcli connection"
@nmtui_vlan_delete_connection_activating
Scenario: nmtui - vlan - delete activating connection
* Prepare new connection of type "VLAN" named "eth1.99"
* Set "Device" field to "eth1.99"
* Ensure "Automatically connect" is checked
* Confirm the connection settings
* "eth1.99\s+vlan\s+connecting" is visible with command "nmcli device" in "10" seconds
* Select connection "eth1.99" in the list
* Choose to "<Delete>" a connection
* Press "Delete" button in the dialog
Then "eth1.99" is not visible with command "nmcli connection"
Then "eth1.99" is not visible with command "nmcli device"
@nmtui_vlan_delete_connection_up
Scenario: nmtui - vlan - delete active connection
* Prepare new connection of type "VLAN" named "eth1.99"
* Set "Device" field to "eth1.99"
* Set "IPv4 CONFIGURATION" category to "Link-Local"
* Ensure "Automatically connect" is checked
* Confirm the connection settings
* "eth1.99\s+vlan\s+connected" is visible with command "nmcli device" in "10" seconds
* "169.254" is visible with command "ip a s eth1.99" in "10" seconds
* Select connection "eth1.99" in the list
* Choose to "<Delete>" a connection
* Press "Delete" button in the dialog
Then "eth1.99" is not visible with command "nmcli connection"
Then "eth1.99" is not visible with command "nmcli device"
@nmtui_vlan_create_no_autoconnect
Scenario: nmtui - vlan - create connetion without autoconnect
* Prepare new connection of type "VLAN" named "eth1.99"
* Set "Device" field to "eth1.99"
* Set "IPv4 CONFIGURATION" category to "Link-Local"
* Ensure "Automatically connect" is not checked
* Confirm the connection settings
Then "eth1.99" is visible with command "nmcli connection"
Then "eth1.99" is not visible with command "nmcli device"
@nmtui_vlan_activate_connection
Scenario: nmtui - vlan - activate connection
* Prepare new connection of type "VLAN" named "eth1.99"
* Set "Device" field to "eth1.99"
* Set "IPv4 CONFIGURATION" category to "Link-Local"
* Ensure "Automatically connect" is not checked
* Confirm the connection settings
* "eth1.99" is visible with command "nmcli connection"
* "eth1.99" is not visible with command "nmcli device"
* Come back to main screen
* Choose to "Activate a connection" from main screen
* Select connection "eth1.99" in the list
* Choose to "<Activate>" a connection
Then "inet 169.254" is visible with command "ip a s eth1.99" in "10" seconds
Then "eth1.99\s+vlan\s+connected" is visible with command "nmcli device"
@ifcfg-rh
@nmtui_vlan_deactivate_connection_wo_autoconnect
Scenario: nmtui - vlan - deactivate connection without autoconnect
* Prepare new connection of type "VLAN" named "eth1.99"
* Set "Device" field to "eth1.99"
* Set "IPv4 CONFIGURATION" category to "Link-Local"
* Ensure "Automatically connect" is not checked
* Confirm the connection settings
* Check ifcfg-name file created for connection "eth1.99"
* "eth1.99" is visible with command "nmcli connection"
* "eth1.99" is not visible with command "nmcli device"
* Execute "nmcli connection up eth1.99"
* Come back to main screen
* Choose to "Activate a connection" from main screen
* Select connection "eth1.99" in the list
* Choose to "<Deactivate>" a connection
* Wait for "3" seconds
Then "inet 169.254" is not visible with command "ip a s eth1.99"
Then "eth1.99" is not visible with command "nmcli device"
Then "eth1.99" is visible with command "nmcli connection"
@nmtui_vlan_deactivate_connection_with_autoconnect
Scenario: nmtui - vlan - deactivate connection with autoconnect
* Prepare new connection of type "VLAN" named "eth1.99"
* Set "Device" field to "eth1.99"
* Set "IPv4 CONFIGURATION" category to "Link-Local"
* Ensure "Automatically connect" is checked
* Confirm the connection settings
* "eth1.99" is visible with command "nmcli connection"
* "eth1.99" is visible with command "nmcli device"
* Come back to main screen
* Choose to "Activate a connection" from main screen
* Select connection "eth1.99" in the list
* Choose to "<Deactivate>" a connection
* Wait for "3" seconds
Then "inet 169.254" is not visible with command "ip a s eth1.99"
Then "eth1.99" is not visible with command "nmcli device"
Then "eth1.99" is visible with command "nmcli connection"
@nmtui_vlan_change_id
Scenario: nmtui - vlan - change id
* Prepare new connection of type "VLAN" named "vlan"
* Set "Device" field to "eth1.99"
* Set "IPv4 CONFIGURATION" category to "Link-Local"
* Confirm the connection settings
* Select connection "vlan" in the list
* Choose to "<Edit...>" a connection
* Set "Device" field to "eth1.88"
* Set "VLAN id" field to "88"
* Confirm the connection settings
* Come back to main screen
* Choose to "Activate a connection" from main screen
* Select connection "vlan" in the list
* "eth1.99" is visible with command "nmcli device"
* "VID: 99" is visible with command "cat /proc/net/vlan/eth1.99"
* Choose to "<Deactivate>" a connection
* Wait for "3" seconds
* Press "UPARROW" key
* Select connection "vlan" in the list
* Choose to "<Activate>" a connection
Then "eth1.88" is visible with command "nmcli device" in "10" seconds
Then "eth1.99" is not visible with command "nmcli device"
Then "VID: 88" is visible with command "cat /proc/net/vlan/eth1.88"