authpolicy: Add unit test for DevicePolicyEncoder |
|||||||
Issue descriptionDevicePolicyEncoder contains hand-written code to map RegistryDicts to device policy protobufs. If a new policy gets added to the proto in Chromium, the proto will eventually be propagated to Chromium OS and unless the committer is aware of DevicePolicyEncoder, the new policy will not be handled. Thus, a unit test needs to be added that makes sure that every policy is handled.
,
Nov 3 2016
,
Nov 11 2016
,
Nov 21 2016
,
Dec 29 2016
Nice
,
Mar 30 2017
,
Mar 31 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ccd75912ceea7ff6171e35e7b98bdfb618b9265f commit ccd75912ceea7ff6171e35e7b98bdfb618b9265f Author: ljusten <ljusten@chromium.org> Date: Fri Mar 31 09:33:22 2017 Generate list of Chrome OS device polices Modifies the script that generates code from policy_templates.json to output a list of all supported device policies. The code is not used in Chromium. It will be used in Chrome OS's authpolicy project in order to make sure that its code to encode a device policy protobuf handles all device policies. BUG= 659101 TEST=Compiled Chromium, tested autogenerated code in Chrome OS Review-Url: https://codereview.chromium.org/2777063009 Cr-Commit-Position: refs/heads/master@{#461088} [modify] https://crrev.com/ccd75912ceea7ff6171e35e7b98bdfb618b9265f/components/policy/tools/generate_policy_source.py
,
Apr 4 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/6ddff3e3ee76d79c3cf5538fdecb649f64348d08 commit 6ddff3e3ee76d79c3cf5538fdecb649f64348d08 Author: Lutz Justen <ljusten@chromium.org> Date: Tue Apr 04 02:09:15 2017 authpolicy: Add unit test for DevicePolicyEncoder Makes sure that all device policies get encoded into protobuf properly. Gets rid of a weird hack for integer and boolean policies to make sure that EncodeInteger and EncodeBoolean wasn't mixed up. If the two are mixed up now, the unit test fails since the policy is not actually encoded. Uses recent changes to generate_policy_source.py to make sure that all device policies are actually handled and unit tested. Thus, if protofiles gets uprev'ed and the uprev'er forgets to add new device policies, this unit test fails. BUG= chromium:659101 TEST=Compiled, ran tests, made sure it works as described here. Change-Id: If655f967c231715ded31959d5f8abbaa1577f21a Reviewed-on: https://chromium-review.googlesource.com/462966 Commit-Ready: Lutz Justen <ljusten@chromium.org> Tested-by: Lutz Justen <ljusten@chromium.org> Reviewed-by: Roman Sorokin <rsorokin@chromium.org> [modify] https://crrev.com/6ddff3e3ee76d79c3cf5538fdecb649f64348d08/authpolicy/policy/device_policy_encoder.cc [modify] https://crrev.com/6ddff3e3ee76d79c3cf5538fdecb649f64348d08/authpolicy/policy/device_policy_encoder.h [add] https://crrev.com/6ddff3e3ee76d79c3cf5538fdecb649f64348d08/authpolicy/policy/device_policy_encoder_unittest.cc [modify] https://crrev.com/6ddff3e3ee76d79c3cf5538fdecb649f64348d08/authpolicy/authpolicy.gyp
,
Apr 4 2017
,
Jul 6 2017
bulk Verify of Chromad V1 bugs |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by ljusten@chromium.org
, Oct 27 2016