OSDN Git Service

Fix installd test
authorCalin Juravle <calin@google.com>
Thu, 13 Apr 2017 01:20:44 +0000 (18:20 -0700)
committerCalin Juravle <calin@google.com>
Thu, 13 Apr 2017 01:21:14 +0000 (18:21 -0700)
CreatePrimaryCurrentProfile was using the wrong userid for the expected
value.

Test: adb shell /data/nativetest/installd_utils_test/installd_utils_test
Bug: 36101738
Change-Id: I80b8212d09a0e4b600c00f85ac604a0e5fa1cc11

cmds/installd/tests/installd_utils_test.cpp

index 49605be..dab3236 100644 (file)
@@ -547,7 +547,7 @@ TEST_F(UtilsTest, CreateDataRefProfilePackagePath) {
 
 TEST_F(UtilsTest, CreatePrimaryCurrentProfile) {
     std::string expected =
-        create_primary_current_profile_package_dir_path(1, "com.example") + "/primary.prof";
+        create_primary_current_profile_package_dir_path(0, "com.example") + "/primary.prof";
     EXPECT_EQ(expected,
             create_current_profile_path(/*user*/0, "com.example", /*is_secondary*/false));
 }