Merge ~sylvain-pineau/checkbox-ng:xml-removal into checkbox-ng:master
- Git
- lp:~sylvain-pineau/checkbox-ng
- xml-removal
- Merge into master
Proposed by
Sylvain Pineau
Status: | Merged |
---|---|
Approved by: | Sylvain Pineau |
Approved revision: | 8e701f5f659050cccc355b9080e22a9feb73a2e7 |
Merged at revision: | 29dd46691720384c6f99a452fb5e5fcdcf1061db |
Proposed branch: | ~sylvain-pineau/checkbox-ng:xml-removal |
Merge into: | checkbox-ng:master |
Diff against target: |
592 lines (+40/-263) 10 files modified
checkbox_ng/certification.py (+2/-146) checkbox_ng/launcher/subcommands.py (+11/-38) checkbox_ng/test_certification.py (+19/-42) dev/null (+0/-1) docs/conf.py (+1/-3) docs/index.rst (+0/-18) docs/launcher-tutorial.rst (+6/-9) docs/stack.rst (+1/-3) requirements/deb-core.txt (+0/-1) setup.py (+0/-2) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Sylvain Pineau (community) | Needs Resubmitting | ||
Maciej Kisielewski (community) | Approve | ||
Review via email:
|
Commit message
Description of the change
Remove XML/HEXR exporter support from checkbox-ng
Requires: https:/
To post a comment you must log in.
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Sylvain Pineau (sylvain-pineau) wrote : | # |
sample_xml -> sample_archive
review:
Needs Resubmitting
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | diff --git a/checkbox_ng/certification.py b/checkbox_ng/certification.py |
2 | index c46956a..bccae83 100644 |
3 | --- a/checkbox_ng/certification.py |
4 | +++ b/checkbox_ng/certification.py |
5 | @@ -23,7 +23,7 @@ |
6 | ============================================================================= |
7 | |
8 | This module contains a PlainBox transport that knows how to send the |
9 | -certification XML data to the Canonical certification database. |
10 | +certification tarball to the Canonical certification database. |
11 | """ |
12 | |
13 | from gettext import gettext as _ |
14 | @@ -41,147 +41,6 @@ import requests |
15 | logger = getLogger("checkbox.ng.certification") |
16 | |
17 | |
18 | -class CertificationTransport(TransportBase): |
19 | - """ |
20 | - Transport for sending data to certification database. |
21 | - - POSTs data to a http(s) endpoint |
22 | - - Adds a header with a hardware identifier |
23 | - - Payload can be in: |
24 | - * checkbox xml-compatible format. |
25 | - This means it will work best with a stream produced by the xml |
26 | - exporter. |
27 | - """ |
28 | - |
29 | - def __init__(self, where, options): |
30 | - """ |
31 | - Initialize the Certification Transport. |
32 | - |
33 | - The options string may contain 'secure_id' which must be |
34 | - a 15-character (or longer) alphanumeric ID for the system. |
35 | - |
36 | - It may also contain a submit_to_hexr boolean, set to 1 |
37 | - to enable submission to hexr. |
38 | - """ |
39 | - super().__init__(where, options) |
40 | - # Interpret this setting here |
41 | - submit_to_hexr = self.options.get('submit_to_hexr') |
42 | - self._submit_to_hexr = False |
43 | - try: |
44 | - if submit_to_hexr and (submit_to_hexr.lower() in |
45 | - ('yes', 'true') or |
46 | - int(submit_to_hexr) == 1): |
47 | - self._submit_to_hexr = True |
48 | - except ValueError: |
49 | - # Just leave it at False |
50 | - pass |
51 | - self._secure_id = self.options.get('secure_id') |
52 | - if self._secure_id is not None: |
53 | - self._validate_secure_id(self._secure_id) |
54 | - |
55 | - def send(self, data, config=None, session_state=None): |
56 | - """ |
57 | - Sends data to the specified server. |
58 | - |
59 | - :param data: |
60 | - Data containing the xml dump to be sent to the server. This |
61 | - can be either bytes or a file-like object (BytesIO works fine too). |
62 | - If this is a file-like object, it will be read and streamed "on |
63 | - the fly". |
64 | - :param config: |
65 | - Optional PlainBoxConfig object. If http_proxy and https_proxy |
66 | - values are set in this config object, they will be used to send |
67 | - data via the specified protocols. Note that the transport also |
68 | - honors the http_proxy and https_proxy environment variables. |
69 | - Proxy string format is http://[user:password@]<proxy-ip>:port |
70 | - :param session_state: |
71 | - The session for which this transport is associated with |
72 | - the data being sent (optional) |
73 | - :returns: |
74 | - A dictionary with responses from the server if submission |
75 | - was successful. This should contain an 'id' key, however |
76 | - the server response may change, so the only guarantee |
77 | - we make is that this will be non-False if the server |
78 | - accepted the data. Returns empty dictionary otherwise. |
79 | - :raises requests.exceptions.Timeout: |
80 | - If sending timed out. |
81 | - :raises requests.exceptions.ConnectionError: |
82 | - If connection failed outright. |
83 | - :raises requests.exceptions.HTTPError: |
84 | - If the server returned a non-success result code |
85 | - """ |
86 | - proxies = None |
87 | - if config and config.environment is not Unset: |
88 | - proxies = { |
89 | - proto[:-len("_proxy")]: config.environment[proto] |
90 | - for proto in ['http_proxy', 'https_proxy'] |
91 | - if proto in config.environment |
92 | - } |
93 | - # Find the effective value of secure_id: |
94 | - # - use the configuration object (if available) |
95 | - # - override with secure_id= option (if defined) |
96 | - secure_id = None |
97 | - if config is not None and hasattr(config, 'secure_id'): |
98 | - secure_id = config.secure_id |
99 | - if self._secure_id is not None: |
100 | - secure_id = self._secure_id |
101 | - if secure_id is None: |
102 | - raise InvalidSecureIDError(_("Secure ID not specified")) |
103 | - self._validate_secure_id(secure_id) |
104 | - logger.debug( |
105 | - _("Sending to %s, Secure ID is %s"), self.url, secure_id) |
106 | - headers = {"X_HARDWARE_ID": secure_id} |
107 | - # Similar handling for submit_to_hexr |
108 | - submit_to_hexr = False |
109 | - if config is not None and hasattr(config, 'submit_to_hexr'): |
110 | - submit_to_hexr = config.submit_to_hexr |
111 | - logger.debug(_("submit_to_hexr set to %s by config"), |
112 | - submit_to_hexr) |
113 | - if self._submit_to_hexr: |
114 | - submit_to_hexr = self._submit_to_hexr |
115 | - logger.debug(_("submit_to_hexr set to %s by UI"), submit_to_hexr) |
116 | - # We could always set this header since hexr will only process a value |
117 | - # of 'True', but this avoids injecting that extraneous knowledge into |
118 | - # the tests. |
119 | - # Note that hexr will only process a submission with this header's |
120 | - # value set to 'True', so this boolean conversion should be ok. |
121 | - if submit_to_hexr: |
122 | - headers["X-Share-With-HEXR"] = submit_to_hexr |
123 | - |
124 | - # Requests takes care of properly handling a file-like data. |
125 | - form_payload = {"data": data} |
126 | - try: |
127 | - response = requests.post( |
128 | - self.url, files=form_payload, headers=headers, proxies=proxies) |
129 | - except requests.exceptions.Timeout as exc: |
130 | - raise TransportError( |
131 | - _("Request to {0} timed out: {1}").format(self.url, exc)) |
132 | - except requests.exceptions.InvalidSchema as exc: |
133 | - raise TransportError( |
134 | - _("Invalid destination URL: {0}").format(exc)) |
135 | - except requests.exceptions.ConnectionError as exc: |
136 | - raise TransportError( |
137 | - _("Unable to connect to {0}: {1}").format(self.url, exc)) |
138 | - if response is not None: |
139 | - try: |
140 | - # This will raise HTTPError for status != 20x |
141 | - response.raise_for_status() |
142 | - except requests.exceptions.RequestException as exc: |
143 | - raise TransportError(str(exc)) |
144 | - logger.debug("Success! Server said %s", response.text) |
145 | - try: |
146 | - return response.json() |
147 | - except Exception as exc: |
148 | - raise TransportError(str(exc)) |
149 | - |
150 | - # ISessionStateTransport.send must return dictionary |
151 | - return {} |
152 | - |
153 | - def _validate_secure_id(self, secure_id): |
154 | - if not re.match(SECURE_ID_PATTERN, secure_id): |
155 | - raise InvalidSecureIDError( |
156 | - _("secure_id must be 15-character (or more) alphanumeric string")) |
157 | - |
158 | - |
159 | class SubmissionServiceTransport(TransportBase): |
160 | """ |
161 | Transport for sending data to certification database. |
162 | @@ -197,9 +56,6 @@ class SubmissionServiceTransport(TransportBase): |
163 | |
164 | The options string may contain 'secure_id' which must be |
165 | a 15-character (or longer) alphanumeric ID for the system. |
166 | - |
167 | - It may also contain a submit_to_hexr boolean, set to 1 |
168 | - to enable submission to hexr. |
169 | """ |
170 | super().__init__(where, options) |
171 | self._secure_id = self.options.get('secure_id') |
172 | @@ -211,7 +67,7 @@ class SubmissionServiceTransport(TransportBase): |
173 | Sends data to the specified server. |
174 | |
175 | :param data: |
176 | - Data containing the xml dump to be sent to the server. This |
177 | + Data containing the session dump to be sent to the server. This |
178 | can be either bytes or a file-like object (BytesIO works fine too). |
179 | If this is a file-like object, it will be read and streamed "on |
180 | the fly". |
181 | diff --git a/checkbox_ng/launcher/subcommands.py b/checkbox_ng/launcher/subcommands.py |
182 | index af8ce9c..ce5a2e6 100644 |
183 | --- a/checkbox_ng/launcher/subcommands.py |
184 | +++ b/checkbox_ng/launcher/subcommands.py |
185 | @@ -98,19 +98,8 @@ class Submit(Command): |
186 | if ctx.args.staging: |
187 | url = ('https://certification.staging.canonical.com/' |
188 | 'api/v1/submission/{}/'.format(ctx.args.secure_id)) |
189 | - if ctx.args.submission.endswith('xml'): |
190 | - from checkbox_ng.certification import CertificationTransport |
191 | - transport_cls = CertificationTransport |
192 | - mode = 'r' |
193 | - enc = 'utf-8' |
194 | - url = ('https://certification.canonical.com/' |
195 | - 'submissions/submit/') |
196 | - if ctx.args.staging: |
197 | - url = ('https://certification.staging.canonical.com/' |
198 | - 'submissions/submit/') |
199 | - else: |
200 | - from checkbox_ng.certification import SubmissionServiceTransport |
201 | - transport_cls = SubmissionServiceTransport |
202 | + from checkbox_ng.certification import SubmissionServiceTransport |
203 | + transport_cls = SubmissionServiceTransport |
204 | transport = transport_cls(url, options_string) |
205 | try: |
206 | with open(ctx.args.submission, mode, encoding=enc) as subm_file: |
207 | @@ -587,24 +576,24 @@ class Launcher(Command, MainLoopStage): |
208 | self.launcher.reports['1_text_to_screen'] = { |
209 | 'transport': 'stdout', 'exporter': 'text', 'forced': 'yes'} |
210 | elif report == 'certification': |
211 | - self.launcher.exporters['hexr'] = { |
212 | - 'unit': 'com.canonical.plainbox::hexr'} |
213 | + self.launcher.exporters['tar'] = { |
214 | + 'unit': 'com.canonical.plainbox::tar'} |
215 | self.launcher.transports['c3'] = { |
216 | - 'type': 'certification', |
217 | + 'type': 'submission-service', |
218 | 'secure_id': self.launcher.transports.get('c3', {}).get( |
219 | 'secure_id', None)} |
220 | self.launcher.reports['upload to certification'] = { |
221 | - 'transport': 'c3', 'exporter': 'hexr'} |
222 | + 'transport': 'c3', 'exporter': 'tar'} |
223 | elif report == 'certification-staging': |
224 | - self.launcher.exporters['hexr'] = { |
225 | - 'unit': 'com.canonical.plainbox::hexr'} |
226 | + self.launcher.exporters['tar'] = { |
227 | + 'unit': 'com.canonical.plainbox::tar'} |
228 | self.launcher.transports['c3-staging'] = { |
229 | - 'type': 'certification', |
230 | + 'type': 'submission-service', |
231 | 'secure_id': self.launcher.transports.get('c3', {}).get( |
232 | 'secure_id', None), |
233 | 'staging': 'yes'} |
234 | self.launcher.reports['upload to certification-staging'] = { |
235 | - 'transport': 'c3-staging', 'exporter': 'hexr'} |
236 | + 'transport': 'c3-staging', 'exporter': 'tar'} |
237 | elif report == 'submission_files': |
238 | # LP:1585326 maintain isoformat but removing ':' chars that cause |
239 | # issues when copying files. |
240 | @@ -612,7 +601,7 @@ class Launcher(Command, MainLoopStage): |
241 | timestamp = datetime.datetime.utcnow().strftime(isoformat) |
242 | if not os.path.exists(self.base_dir): |
243 | os.makedirs(self.base_dir) |
244 | - for exporter, file_ext in [('hexr', '.xml'), ('html', '.html'), |
245 | + for exporter, file_ext in [('html', '.html'), |
246 | ('junit', '.junit.xml'), |
247 | ('xlsx', '.xlsx'), ('tar', '.tar.xz')]: |
248 | path = os.path.join(self.base_dir, ''.join( |
249 | @@ -652,22 +641,6 @@ class Launcher(Command, MainLoopStage): |
250 | elif tr_type == 'stream': |
251 | self.transports[transport] = cls( |
252 | self.launcher.transports[transport]['stream']) |
253 | - elif tr_type == 'certification': |
254 | - if self.launcher.transports[transport].get('staging', False): |
255 | - url = ('https://certification.staging.canonical.com/' |
256 | - 'submissions/submit/') |
257 | - else: |
258 | - url = ('https://certification.canonical.com/' |
259 | - 'submissions/submit/') |
260 | - secure_id = self.launcher.transports[transport].get( |
261 | - 'secure_id', None) |
262 | - if not secure_id and self.is_interactive: |
263 | - secure_id = input(self.C.BLUE(_('Enter secure-id:'))) |
264 | - if secure_id: |
265 | - options = "secure_id={}".format(secure_id) |
266 | - else: |
267 | - options = "" |
268 | - self.transports[transport] = cls(url, options) |
269 | elif tr_type == 'submission-service': |
270 | secure_id = self.launcher.transports[transport].get( |
271 | 'secure_id', None) |
272 | diff --git a/checkbox_ng/test_certification.py b/checkbox_ng/test_certification.py |
273 | index e2d558e..2c61bab 100644 |
274 | --- a/checkbox_ng/test_certification.py |
275 | +++ b/checkbox_ng/test_certification.py |
276 | @@ -1,9 +1,10 @@ |
277 | # This file is part of Checkbox. |
278 | # |
279 | -# Copyright 2012, 2013 Canonical Ltd. |
280 | +# Copyright 2012, 2017 Canonical Ltd. |
281 | # Written by: |
282 | # Zygmunt Krynicki <zygmunt.krynicki@canonical.com> |
283 | # Daniel Manrique <roadmr@ubuntu.com> |
284 | +# Sylvain Pineau <sylvain.pineau@canonical.com> |
285 | # |
286 | # Checkbox is free software: you can redistribute it and/or modify |
287 | # it under the terms of the GNU General Public License version 3, |
288 | @@ -37,10 +38,10 @@ from plainbox.vendor.mock import MagicMock |
289 | from requests.exceptions import ConnectionError, InvalidSchema, HTTPError |
290 | import requests |
291 | |
292 | -from checkbox_ng.certification import CertificationTransport |
293 | +from checkbox_ng.certification import SubmissionServiceTransport |
294 | |
295 | |
296 | -class CertificationTransportTests(TestCase): |
297 | +class SubmissionServiceTransportTests(TestCase): |
298 | |
299 | # URL are just here to exemplify, since we mock away all network access, |
300 | # they're not really used. |
301 | @@ -51,39 +52,34 @@ class CertificationTransportTests(TestCase): |
302 | valid_option_string = "secure_id={}".format(valid_secure_id) |
303 | |
304 | def setUp(self): |
305 | - self.sample_xml = BytesIO(resource_string( |
306 | - "plainbox", "test-data/xml-exporter/example-data.xml" |
307 | + self.sample_archive = BytesIO(resource_string( |
308 | + "plainbox", "test-data/tar-exporter/example-data.tar.xz" |
309 | )) |
310 | self.patcher = mock.patch('requests.post') |
311 | self.mock_requests = self.patcher.start() |
312 | |
313 | def test_parameter_parsing(self): |
314 | # Makes sense since I'm overriding the base class's constructor. |
315 | - transport = CertificationTransport( |
316 | + transport = SubmissionServiceTransport( |
317 | self.valid_url, self.valid_option_string) |
318 | self.assertEqual(self.valid_url, transport.url) |
319 | self.assertEqual(self.valid_secure_id, |
320 | transport.options['secure_id']) |
321 | |
322 | - def test_submit_to_hexr_interpretation(self): |
323 | - transport = CertificationTransport( |
324 | - self.valid_url, "submit_to_hexr=1") |
325 | - self.assertTrue(transport._submit_to_hexr is True) |
326 | - |
327 | def test_invalid_length_secure_id_are_rejected(self): |
328 | length = 14 |
329 | dummy_id = "a" * length |
330 | option_string = "secure_id={}".format(dummy_id) |
331 | with self.assertRaises(InvalidSecureIDError): |
332 | - CertificationTransport(self.valid_url, option_string) |
333 | + SubmissionServiceTransport(self.valid_url, option_string) |
334 | |
335 | def test_invalid_characters_in_secure_id_are_rejected(self): |
336 | option_string = "secure_id=aA0#" |
337 | with self.assertRaises(InvalidSecureIDError): |
338 | - CertificationTransport(self.valid_url, option_string) |
339 | + SubmissionServiceTransport(self.valid_url, option_string) |
340 | |
341 | def test_invalid_url(self): |
342 | - transport = CertificationTransport( |
343 | + transport = SubmissionServiceTransport( |
344 | self.invalid_url, self.valid_option_string) |
345 | dummy_data = BytesIO(b"some data to send") |
346 | requests.post.side_effect = InvalidSchema |
347 | @@ -92,12 +88,11 @@ class CertificationTransportTests(TestCase): |
348 | result = transport.send(dummy_data) |
349 | self.assertIsNotNone(result) |
350 | requests.post.assert_called_with( |
351 | - self.invalid_url, files={'data': dummy_data}, |
352 | - headers={'X_HARDWARE_ID': self.valid_secure_id}, proxies=None) |
353 | + self.invalid_url, data=dummy_data, proxies=None) |
354 | |
355 | @mock.patch('checkbox_ng.certification.logger') |
356 | def test_valid_url_cant_connect(self, mock_logger): |
357 | - transport = CertificationTransport( |
358 | + transport = SubmissionServiceTransport( |
359 | self.unreachable_url, self.valid_option_string) |
360 | dummy_data = BytesIO(b"some data to send") |
361 | requests.post.side_effect = ConnectionError |
362 | @@ -105,37 +100,20 @@ class CertificationTransportTests(TestCase): |
363 | result = transport.send(dummy_data) |
364 | self.assertIsNotNone(result) |
365 | requests.post.assert_called_with(self.unreachable_url, |
366 | - files={'data': dummy_data}, |
367 | - headers={'X_HARDWARE_ID': |
368 | - self.valid_secure_id}, |
369 | - proxies=None) |
370 | - |
371 | - @mock.patch('checkbox_ng.certification.logger') |
372 | - def test_share_with_hexr_header_sent(self, mock_logger): |
373 | - transport = CertificationTransport( |
374 | - self.valid_url, self.valid_option_string+",submit_to_hexr=1") |
375 | - dummy_data = BytesIO(b"some data to send") |
376 | - result = transport.send(dummy_data) |
377 | - self.assertIsNotNone(result) |
378 | - requests.post.assert_called_with(self.valid_url, |
379 | - files={'data': dummy_data}, |
380 | - headers={'X_HARDWARE_ID': |
381 | - self.valid_secure_id, |
382 | - 'X-Share-With-HEXR': |
383 | - True}, |
384 | + data=dummy_data, |
385 | proxies=None) |
386 | |
387 | def test_send_success(self): |
388 | - transport = CertificationTransport( |
389 | + transport = SubmissionServiceTransport( |
390 | self.valid_url, self.valid_option_string) |
391 | requests.post.return_value = MagicMock(name='response') |
392 | requests.post.return_value.status_code = 200 |
393 | requests.post.return_value.text = '{"id": 768}' |
394 | - result = transport.send(self.sample_xml) |
395 | + result = transport.send(self.sample_archive) |
396 | self.assertTrue(result) |
397 | |
398 | def test_send_failure(self): |
399 | - transport = CertificationTransport( |
400 | + transport = SubmissionServiceTransport( |
401 | self.valid_url, self.valid_option_string) |
402 | requests.post.return_value = MagicMock(name='response') |
403 | requests.post.return_value.status_code = 412 |
404 | @@ -145,7 +123,7 @@ class CertificationTransportTests(TestCase): |
405 | requests.post.return_value.raise_for_status = MagicMock( |
406 | side_effect=HTTPError) |
407 | with self.assertRaises(TransportError): |
408 | - transport.send(self.sample_xml) |
409 | + transport.send(self.sample_archive) |
410 | |
411 | def proxy_test(self, environment, proxies): |
412 | test_environment = environment |
413 | @@ -153,7 +131,7 @@ class CertificationTransportTests(TestCase): |
414 | test_config = PlainBoxConfig() |
415 | test_config.environment = test_environment |
416 | |
417 | - transport = CertificationTransport( |
418 | + transport = SubmissionServiceTransport( |
419 | self.valid_url, self.valid_option_string) |
420 | dummy_data = BytesIO(b"some data to send") |
421 | |
422 | @@ -163,8 +141,7 @@ class CertificationTransportTests(TestCase): |
423 | result = transport.send(dummy_data, config=test_config) |
424 | self.assertTrue(result) |
425 | requests.post.assert_called_with( |
426 | - self.valid_url, files={'data': dummy_data}, |
427 | - headers={'X_HARDWARE_ID': self.valid_secure_id}, |
428 | + self.valid_url, data=dummy_data, |
429 | proxies=test_proxies) |
430 | |
431 | def test_set_only_one_proxy(self): |
432 | diff --git a/contrib/com.canonical.certification.PlainBox1.service b/contrib/com.canonical.certification.PlainBox1.service |
433 | deleted file mode 100644 |
434 | index a40cf65..0000000 |
435 | --- a/contrib/com.canonical.certification.PlainBox1.service |
436 | +++ /dev/null |
437 | @@ -1,3 +0,0 @@ |
438 | -[D-BUS Service] |
439 | -Name=com.canonical.certification.PlainBox1 |
440 | -Exec=/usr/bin/checkbox service |
441 | diff --git a/docs/conf.py b/docs/conf.py |
442 | index 970bfc7..58b6dba 100644 |
443 | --- a/docs/conf.py |
444 | +++ b/docs/conf.py |
445 | @@ -24,9 +24,7 @@ else: |
446 | # Inject mock modules so that we can build the |
447 | # documentation without having the real stuff available |
448 | from plainbox.vendor import mock |
449 | - for mod_name in ['lxml', 'xlsxwriter', 'dbus', 'dbus.lowlevel', |
450 | - 'dbus.exceptions', 'dbus._compat', 'dbus.service', |
451 | - '_dbus_bindings']: |
452 | + for mod_name in ['xlsxwriter']: |
453 | sys.modules[mod_name] = mock.Mock() |
454 | print("Mocked {}".format(mod_name)) |
455 | try: |
456 | diff --git a/docs/index.rst b/docs/index.rst |
457 | index 844f14f..ea4a5df 100644 |
458 | --- a/docs/index.rst |
459 | +++ b/docs/index.rst |
460 | @@ -31,24 +31,6 @@ or newer. |
461 | |
462 | $ sudo add-apt-repository ppa:hardware-certification/public && sudo apt-get update && sudo apt-get install checkbox-ng |
463 | |
464 | -Running stable release update tests |
465 | -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
466 | - |
467 | -Checkbox has special support for running stable release updates tests in an |
468 | -automated manner. This runs all the jobs from the *sru.test plan* and sends the |
469 | -results to the certification website. |
470 | - |
471 | -To run SRU tests you will need to know the so-called :term:`Secure ID` of the |
472 | -device you are testing. Once you know that all you need to do is run: |
473 | - |
474 | -.. code-block:: bash |
475 | - |
476 | - $ checkbox sru $secure_id submission.xml |
477 | - |
478 | -The second argument, submission.xml, is a name of the fallback file that is |
479 | -only created when sending the data to the certification website fails to work |
480 | -for any reason. |
481 | - |
482 | Table of contents |
483 | ================= |
484 | |
485 | diff --git a/docs/launcher-tutorial.rst b/docs/launcher-tutorial.rst |
486 | index 74dcf0d..d6dd71d 100644 |
487 | --- a/docs/launcher-tutorial.rst |
488 | +++ b/docs/launcher-tutorial.rst |
489 | @@ -99,7 +99,7 @@ number of the stock ones. In launchers version 1 there are 4 stock reports you |
490 | may use: |
491 | |
492 | * ``text`` - print results as text on standard output |
493 | - * ``submission_files`` - write ``html``, ``xlsx``, ``json`` and ``xml`` |
494 | + * ``submission_files`` - write ``html``, ``xlsx``, ``json`` and ``tar.xz`` |
495 | files to ``$XDG_DATA_HOME`` directory (or to ``~/.local/share/`` if |
496 | ``$XDG_DATA_HOME`` is not defined. |
497 | * ``certification`` - send results to certification site |
498 | @@ -485,7 +485,7 @@ report to standard output. |
499 | exporter = text |
500 | |
501 | 2) Interactive testing of FooBar project. Report should be uploaded to the |
502 | -staging version of certification site and saved to /tmp/submission.xml |
503 | +staging version of certification site and saved to /tmp/submission.tar.xz |
504 | |
505 | :: |
506 | |
507 | @@ -512,15 +512,12 @@ staging version of certification site and saved to /tmp/submission.xml |
508 | |
509 | [transport:local_file] |
510 | type = file |
511 | - path = /tmp/submission.xml |
512 | - |
513 | - [exporter:xml] |
514 | - unit = com.canonical.plainbox::hexr |
515 | + path = /tmp/submission.tar.xz |
516 | |
517 | [report:c3-staging] |
518 | - transport = outfile |
519 | - exporter = xml |
520 | + transport = certification |
521 | + exporter = tar |
522 | |
523 | [report:file] |
524 | transport = local_file |
525 | - exporter = xml |
526 | + exporter = tar |
527 | diff --git a/docs/stack.rst b/docs/stack.rst |
528 | index 7e8a6aa..8e36841 100644 |
529 | --- a/docs/stack.rst |
530 | +++ b/docs/stack.rst |
531 | @@ -71,11 +71,9 @@ Component Descriptions |
532 | | Checkbox (CLI) | - The python command-line interface | Application | |
533 | | | | | |
534 | | | - the text user interface | | |
535 | -| | - the SRU testing command | | |
536 | | | | | |
537 | | | - Additional certification APIs | | |
538 | | | | | |
539 | -| | - sending data to Launchpad | | |
540 | | | - sending data to HEXR | | |
541 | +------------------------+---------------------------------------+-------------+ |
542 | | Client Certification | - canonical-certification-client | Provider | |
543 | @@ -107,7 +105,7 @@ Component Descriptions |
544 | | | - Trusted launcher | | |
545 | | | - Dependency resolver | | |
546 | | | - Command line handling | | |
547 | -| | - The XML, HTML and XSLX exporters | | |
548 | +| | - The HTML and XSLX exporters | | |
549 | | | - and more... | | |
550 | | | | | |
551 | | | - Provider development toolkit | | |
552 | diff --git a/requirements/deb-core.txt b/requirements/deb-core.txt |
553 | index 5806499..18a7ef6 100644 |
554 | --- a/requirements/deb-core.txt |
555 | +++ b/requirements/deb-core.txt |
556 | @@ -1,2 +1 @@ |
557 | python3-guacamole |
558 | -python3-lxml |
559 | diff --git a/requirements/deb-dbus.txt b/requirements/deb-dbus.txt |
560 | deleted file mode 100644 |
561 | index a1d5df0..0000000 |
562 | --- a/requirements/deb-dbus.txt |
563 | +++ /dev/null |
564 | @@ -1 +0,0 @@ |
565 | -python3-dbus |
566 | diff --git a/requirements/pip-dbus.txt b/requirements/pip-dbus.txt |
567 | deleted file mode 100644 |
568 | index 43e3c72..0000000 |
569 | --- a/requirements/pip-dbus.txt |
570 | +++ /dev/null |
571 | @@ -1 +0,0 @@ |
572 | -funcsigs==0.3 |
573 | diff --git a/requirements/rpm-dbus.txt b/requirements/rpm-dbus.txt |
574 | deleted file mode 100644 |
575 | index a1d5df0..0000000 |
576 | --- a/requirements/rpm-dbus.txt |
577 | +++ /dev/null |
578 | @@ -1 +0,0 @@ |
579 | -python3-dbus |
580 | diff --git a/setup.py b/setup.py |
581 | index 2b7bfaa..ac86e70 100755 |
582 | --- a/setup.py |
583 | +++ b/setup.py |
584 | @@ -70,8 +70,6 @@ setup( |
585 | 'checkbox-cli=checkbox_ng.launcher.checkbox_cli:main', |
586 | ], |
587 | 'plainbox.transport': [ |
588 | - 'certification=' |
589 | - 'checkbox_ng.certification:CertificationTransport', |
590 | 'submission-service=' |
591 | 'checkbox_ng.certification:SubmissionServiceTransport', |
592 | ], |
+1.
I found one additional change worth considering. See inline.