aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Scull <ascull@google.com>2018-04-16 15:47:46 +0100
committerAndrew Scull <ascull@google.com>2018-04-16 15:47:46 +0100
commitfd33083fb8f82b4861cf8fe4b4b4365681bbcb67 (patch)
tree804803a9742981d82a4bc19fea89a7c4961e0fad
parent5f2f70aee423a44209a7b0e274e09647b29a4e37 (diff)
downloadsystem-test-harness-fd33083fb8f82b4861cf8fe4b4b4365681bbcb67.tar.gz
Keymaster: test provisioning when MEID not set
Regression test for bug reported by factory in b/77830050#comment6. Change-Id: Ie73a20331538d236aea728b4f3b6af8879508d93
-rw-r--r--src/keymaster-provision-tests.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/keymaster-provision-tests.cc b/src/keymaster-provision-tests.cc
index 6432e1a..3c21a96 100644
--- a/src/keymaster-provision-tests.cc
+++ b/src/keymaster-provision-tests.cc
@@ -145,4 +145,19 @@ TEST_F(KeymasterProvisionTest, MaxDeviceIdSuccess) {
ASSERT_EQ((ErrorCode)response.error_code(), ErrorCode::OK);
}
+// Regression test for b/77830050#comment6
+TEST_F(KeymasterProvisionTest, NoMeidSuccess) {
+
+ ProvisionDeviceIdsRequest request;
+ ProvisionDeviceIdsResponse response;
+
+ PopulateDefaultRequest(&request);
+ request.clear_meid();
+
+ Keymaster service(*client);
+
+ ASSERT_NO_ERROR(service.ProvisionDeviceIds(request, &response), "");
+ ASSERT_EQ((ErrorCode)response.error_code(), ErrorCode::OK);
+}
+
} // namespace