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

Proposed by Simon Fels
Status: Merged
Approved by: Roberto Mier Escandon
Approved revision: 128b0137dae80ee22aa5d68c439ed33859c7d4b1
Merged at revision: bfee9ccafd821ced9cb2c8c968bda3d255896d1e
Proposed branch: ~morphis/snappy-hwe-snaps/+git/engineering-tests:locationd-tests
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/engineering-tests:master
Diff against target: 107 lines (+84/-0)
3 files modified
bin/run-locationd-tests (+5/-0)
com.canonical.se:engineering-tests/units/locationd/locationd.pxu (+77/-0)
snapcraft.yaml (+2/-0)
Reviewer Review Type Date Requested Status
System Enablement Bot continuous-integration Approve
Roberto Mier Escandon (community) Approve
Review via email: mp+331553@code.launchpad.net

Description of the change

Add initial set of test cases for locationd snap

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
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Roberto Mier Escandon (rmescandon) wrote :

locationd.pxu needs a blank line at the end of the file

review: Needs Fixing
Revision history for this message
Roberto Mier Escandon (rmescandon) :
review: Approve
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/bin/run-locationd-tests b/bin/run-locationd-tests
2new file mode 100755
3index 0000000..939d2e3
4--- /dev/null
5+++ b/bin/run-locationd-tests
6@@ -0,0 +1,5 @@
7+#!/bin/sh
8+export PATH="$PATH:$SNAP/usr/sbin"
9+exec python3 $(which plainbox) \
10+ run -i '2017.com.canonical.se::locationd.*' \
11+ "$@"
12diff --git a/com.canonical.se:engineering-tests/units/locationd/locationd.pxu b/com.canonical.se:engineering-tests/units/locationd/locationd.pxu
13new file mode 100644
14index 0000000..4cead19
15--- /dev/null
16+++ b/com.canonical.se:engineering-tests/units/locationd/locationd.pxu
17@@ -0,0 +1,77 @@
18+# Copyright 2017 Canonical Ltd.
19+# All rights reserved.
20+#
21+# Written by:
22+# Simon Fels <simon.fels@canonical.com>
23+
24+unit: category
25+id: locationd
26+_name: Location service mediates access to positioning providers
27+
28+id: locationd/setup/ensure_interface_connection
29+category_id: locationd
30+_description: Ensure the locationd interfaces are connected
31+plugin: manual
32+_steps:
33+ 1. If the locationd snap is already installed remove it via
34+ .
35+ $ snap remove locationd
36+ .
37+ 2. Install locationd from the store.
38+ .
39+ $ snap install locationd
40+ .
41+_verification:
42+ Verify that you see the following when running snap interfaces:
43+ :network locationd
44+ locationd:service-control locationd:client-control
45+ locationd:service-observe locationd:client-observe
46+ - locationd:network-manager
47+ - locationd:ubx
48+ - locationd:wpa
49+ .
50+ The network-manager, ubx and wpa plugs are only connected when
51+ corresponding slots exist.
52+
53+id: locationd/client/status_can_be_queried
54+category_id: locationd
55+plugin: manual
56+depends: locationd/setup/ensure_interface_connection
57+_summary: Locationd service status can be queried from a client
58+_purpose:
59+ Ensure that a client can ask the locationd service for its
60+ current status.
61+_steps:
62+ Run the status command
63+ $ locationd.status
64+_verification:
65+ The command should print output similar to the following:
66+ .
67+ is online: true
68+ state: enabled
69+ satellite based positioning: true
70+ reports cell & wifi ids: false
71+ svs: none
72+ .
73+ The values of the different properties can vary depending on
74+ the system configuration but that the output is printed is
75+ enough to verify that the client can talk to the service.
76+
77+id: locationd/client/position_can_be_locked
78+category_id: locationd
79+plugin: manual
80+depends: locationd/client/status_can_be_queried
81+_summary: Position can be locked and queried from the locationd service
82+_purpose:
83+ Ensure that a position can be locked and queried from the locationd service
84+_steps:
85+ Run the monitor command to ask locationd to lock the current position and
86+ print any updates:
87+ .
88+ $ locationd.monitor
89+_verification:
90+ The monitor command should print location data similar to the following:
91+ .
92+ I0929 12:35:41.532965 26912 monitor.cpp:245] Enabled position/heading/velocity updates...
93+ 0.00000 0.00000 n/a n/a n/a 0.00000 0.00000
94+ 53.10040 8.38140 10000.00 n/a n/a 0.00 0.00
95diff --git a/snapcraft.yaml b/snapcraft.yaml
96index 5be0981..0e54781 100644
97--- a/snapcraft.yaml
98+++ b/snapcraft.yaml
99@@ -49,6 +49,8 @@ apps:
100 command: bin/run-serial-vault-tests
101 easy-openvpn:
102 command: bin/run-easy-openvpn-tests
103+ locationd:
104+ command: bin/run-locationd-tests
105
106 parts:
107 common:

Subscribers

People subscribed via source and target branches

to all changes: