Issue metadata
Sign in to add a comment
|
components_unittests's DeviceManagementRequestAuthTest.CannotUseOAuthTokenAsAuthData fails in official builds |
||||||||||||||||||
Issue descriptione.g. here https://logs.chromium.org/logs/chromium/bb/chromium.clang/ToTWin64/2710/+/recipes/steps/components_unittests/0/logs/DeviceManagementRequestAuthTest.CannotUseOAuthTokenAsAuthData/0 / https://ci.chromium.org/buildbot/chromium.clang/ToTWin64/2710 [ RUN ] DeviceManagementRequestAuthTest.CannotUseOAuthTokenAsAuthData ../../components/policy/core/common/cloud/device_management_service_unittest.cc(1198): error: Death test: request_job->SetAuthData(DMAuth::FromOAuthToken(kOAuthToken)) Result: died but not with expected error. Expected: This method does not accept OAuth2 Actual msg: That's because official tests strip the string passed to CHECK(false) and LOG(FATAL), so you can't write death tests that check for a concrete string in official. The usual fix is to not check for a string anywhere. See issue 779820 and the bug linked from there for prior art. The test was added in https://chromium.googlesource.com/chromium/src/+/22e0542a1785ebf1a3fac1bb578b882bd7de6ebf
,
Dec 10
,
Dec 11
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/add6fd18f3430c37d7e69aaa99d7aedec86c9c96 commit add6fd18f3430c37d7e69aaa99d7aedec86c9c96 Author: Aga Wronska <agawronska@chromium.org> Date: Tue Dec 11 16:58:24 2018 Fix DeviceManagementRequestAuthTest.CannotUseOAuthTokenAsAuthData in official builds. Removed string from ASSERT_DEATH, because official tests strip the string passed to CHECK(false) and LOG(FATAL). Bug: 913441 Change-Id: Ib68905b60d214064f341262789b31f763e8108b3 Reviewed-on: https://chromium-review.googlesource.com/c/1370307 Reviewed-by: Lutz Justen <ljusten@chromium.org> Commit-Queue: Aga Wronska <agawronska@chromium.org> Cr-Commit-Position: refs/heads/master@{#615558} [modify] https://crrev.com/add6fd18f3430c37d7e69aaa99d7aedec86c9c96/components/policy/core/common/cloud/device_management_service_unittest.cc
,
Dec 11
|
|||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||
Comment 1 by thakis@chromium.org
, Dec 10