Adjust test security_manager_09_app_install_constraint_check 98/118698/2
authorRafal Krypa <r.krypa@samsung.com>
Mon, 13 Mar 2017 15:42:35 +0000 (16:42 +0100)
committerRafal Krypa <r.krypa@samsung.com>
Mon, 13 Mar 2017 16:14:11 +0000 (17:14 +0100)
Adapt to new change in security-manager that allows platform version
for an app to be changed during app upgrade.

Change-Id: I1f7dfa4602c1561e76ced32870a2c0ea7f20d090
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
src/security-manager-tests/test_cases.cpp

index cb5939b..233f447 100644 (file)
@@ -471,16 +471,14 @@ RUNNER_TEST(security_manager_09_app_install_constraint_check)
     install(users[1], pkgId[0], appId[0], version[0], author[0], hybrid[1], SECURITY_MANAGER_ERROR_INPUT_PARAM);
     // uid_1, pkg_0, app_0, version_0, author_1, not hybrid -> fail (author of app_0 must be the same)
     install(users[1], pkgId[0], appId[0], version[0], author[1], hybrid[0], SECURITY_MANAGER_ERROR_INPUT_PARAM);
-    // uid_1, pkg_0, app_0, version_1, author_0, not hybrid -> fail (version of app_0 must be the same)
-    install(users[1], pkgId[0], appId[0], version[1], author[0], hybrid[0], SECURITY_MANAGER_ERROR_INPUT_PARAM);
+    // uid_1, pkg_0, app_0, version_1, author_0, not hybrid -> ok (version upgrade)
+    install(users[1], pkgId[0], appId[0], version[1], author[0], hybrid[0], SECURITY_MANAGER_SUCCESS);
     // uid_1, pkg_1, app_0, version_0, author_0, not hybrid -> fail (pkg of app_0 must be the same)
     install(users[1], pkgId[1], appId[0], version[0], author[0], hybrid[0], SECURITY_MANAGER_ERROR_INPUT_PARAM);
     // uid_0, pkg_0, app_0, version_0, author_0, not hybrid -> ok (the same app again)
     install(users[0], pkgId[0], appId[0], version[0], author[0], hybrid[0], SECURITY_MANAGER_SUCCESS, false);
     // uid_0, pkg_1, app_0, version_0, author_0, not hybrid -> fail (app_name + uid must be unique)
     install(users[0], pkgId[1], appId[0], version[0], author[0], hybrid[0], SECURITY_MANAGER_ERROR_INPUT_PARAM);
-    // uid_0, pkg_0, app_0, version_1, author_0, not hybrid -> fail (app_name + uid must be unique)
-    install(users[0], pkgId[0], appId[0], version[1], author[0], hybrid[0],  SECURITY_MANAGER_ERROR_INPUT_PARAM);
     // uid_0, pkg_0, app_0, version_0, author_1, not hybrid -> fail (app_name + uid must be unique)
     install(users[0], pkgId[0], appId[0], version[0], author[1], hybrid[0], SECURITY_MANAGER_ERROR_INPUT_PARAM);
 }