aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2022-04-22 21:00:40 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2022-04-22 21:00:40 +0000
commit2c3de310805ec14e277bb14b8348b6d2bda0804a (patch)
tree5a4f537c83d7981eca2375e54355be3bb36f813b
parent9b41cfde7a1f7956ab8554d3d88e2cb617a577f3 (diff)
parent86246512d48166f5d34f7810263aef8d8cae59fb (diff)
downloadRemoteProvisioner-2c3de310805ec14e277bb14b8348b6d2bda0804a.tar.gz
Merge "Fix test for properly provisioned device." into tm-dev
-rw-r--r--tests/unittests/src/com/android/remoteprovisioner/unittest/ServerToSystemTest.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/unittests/src/com/android/remoteprovisioner/unittest/ServerToSystemTest.java b/tests/unittests/src/com/android/remoteprovisioner/unittest/ServerToSystemTest.java
index 047d888..fce52e1 100644
--- a/tests/unittests/src/com/android/remoteprovisioner/unittest/ServerToSystemTest.java
+++ b/tests/unittests/src/com/android/remoteprovisioner/unittest/ServerToSystemTest.java
@@ -233,10 +233,10 @@ public class ServerToSystemTest {
fallbackKeyCerts2[i].getEncoded());
}
assertTrue(provisionedKeyCerts.length > 0);
- // The root certificates should not match.
- assertFalse("Provisioned and fallback attestation key root certificates match.",
- Arrays.equals(fallbackKeyCerts1[fallbackKeyCerts1.length - 1].getEncoded(),
- provisionedKeyCerts[provisionedKeyCerts.length - 1].getEncoded()));
+ // Match against the batch provisioned key, which should be the second entry in the array.
+ assertFalse("Provisioned and fallback attestation key intermediate certificates match.",
+ Arrays.equals(fallbackKeyCerts1[1].getEncoded(),
+ provisionedKeyCerts[1].getEncoded()));
}
@Test