Merge ~morphis/snappy-hwe-snaps/+git/engineering-tests:extend-nm-tests into ~snappy-hwe-team/snappy-hwe-snaps/+git/engineering-tests:master

Proposed by Simon Fels
Status: Merged
Approved by: Jim Hodapp
Approved revision: 34148031ec6c24d0dad3f7d2e8012ab4251e3af5
Merged at revision: 41dfb80c61002ddc4e1aa721e6b86243ae4a8302
Proposed branch: ~morphis/snappy-hwe-snaps/+git/engineering-tests:extend-nm-tests
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/engineering-tests:master
Prerequisite: ~morphis/snappy-hwe-snaps/+git/engineering-tests:wol-tests
Diff against target: 79 lines (+63/-0)
1 file modified
tests/units/network-manager.pxu (+63/-0)
Reviewer Review Type Date Requested Status
Jim Hodapp (community) code Approve
System Enablement Bot continuous-integration Needs Fixing
Review via email: mp+312026@code.launchpad.net

Description of the change

Extend NetworkManager test cases to also cover ethernet plug/unplug

To post a comment you must log in.
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Jim Hodapp (jhodapp) wrote :

A couple of minor things to correct inline below.

review: Needs Fixing (code)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Simon Fels (morphis) wrote :

@Jim: Anything more I need to fix before we can merge this?

Revision history for this message
Jim Hodapp (jhodapp) wrote :

One minor fix left.

review: Needs Fixing
Revision history for this message
Jim Hodapp (jhodapp) wrote :

LGTM

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/tests/units/network-manager.pxu b/tests/units/network-manager.pxu
2index 6d8523c..6921aa7 100644
3--- a/tests/units/network-manager.pxu
4+++ b/tests/units/network-manager.pxu
5@@ -3,11 +3,74 @@
6 #
7 # Written by:
8 # Lorn Potter <lorn.potter@canonical.com>
9+# Simon Fels <simon.fels@canonical.com>
10
11 unit: category
12 id: network_manager
13 _name: Network Manager
14
15+id: network_manager/ethernet/all_ports_detected
16+category_id: network_manager
17+plugin: manual
18+_summary: NetworkManager should detect all available ethernet ports
19+_purpose:
20+ NetworkManager should detect all available ethernet ports by default
21+ on a system and list them as usable devices.
22+_steps:
23+ 1. List all available ethernet ports
24+ $ ifconfig -a | grep -E '$eth'
25+ $ ifconfig -a | grep -E '$en'
26+ 2. List all ethernet ports NetworkManager knows about
27+ $ network-manager.nmcli d
28+_verification:
29+ Both steps should show the same list of ethernet network interfaces.
30+
31+id: network_manager/ethernet/auto_connected
32+category_id: network_manager
33+plugin: manual
34+_summary: NetworkManager should auto-connect any ethernet port with a link
35+_purpose:
36+ When a cable is plugged into an ethernet port NetworkManager should try
37+ to automatically connect the port.
38+ .
39+ NOTE: This test assumes that the cable you plug into the port is connected
40+ to a network which offers a DHCP server.
41+_steps:
42+ 1. Ensure that there is no connection for the port you want to use for
43+ testing. Using a serial console to perform this test is recommended.
44+ 2. Drop any existing connections listed by
45+ $ network-manager.nmcli c show
46+ which are meant for the ethernet port of the device with
47+ $ network-manager.nmcli c delete <UUID>
48+ 3. Plug the cable into the ethernet port.
49+_verification:
50+ The ethernet port should be automatically connected by NetworkManager. This
51+ can be verified with
52+ $ network-manager.nmcli d | grep <ethernet device name>
53+ eth0 ethernet connected <connection name>
54+ Please note that the <connection name> can be different as its
55+ automatically selected by NetworkManager. It can be "Wired Connection 1"
56+ for example.
57+
58+id: network_manager/ethernet/auto_connect_existing_connection
59+category_id: network_manager
60+plugin: manual
61+_summary: Cable plug/unplug should give an existing connection
62+_purpose:
63+ When a cable is unplugged and plugged again the ethernet port should
64+ be automatically reconnected.
65+_steps:
66+ 1. Check if the ethernet port is currently connected
67+ $ network-manager.nmcli d
68+ 2. Unplug the cable from the ethernet port and check the connection
69+ $ network-manager.nmcli d
70+ 3. Plug the cable again and check the connection status.
71+_verification:
72+ Before the cable is unplugged the ethernet port should be marked
73+ as connected. Once the cable is removed the connection status
74+ should switch to unconnected. When plugged back in, it should be marked
75+ again as connected.
76+
77 id: network_manager/ethernet/unmanaged
78 category_id: network_manager
79 plugin: manual

Subscribers

People subscribed via source and target branches

to all changes: