Spring cleaning
[platform/core/test/security-tests.git] / src / security-manager-tests / test_cases_prepare_app.cpp
index 4ad16d4..ff00627 100644 (file)
@@ -131,7 +131,7 @@ ino_t getFileInode(const std::string &path)
 
 std::string getTextFileContents(const std::string &path)
 {
-    std::ifstream in(path.c_str());
+    std::ifstream in(path);
     if (in.fail())
         return std::string();
     std::stringstream ss;
@@ -172,13 +172,13 @@ RUNNER_CHILD_TEST(security_manager_100_synchronize_credentials_test)
             for (size_t i = 0; i < THREADS; i++)
                 threads[i].run(i, expectedLabel);
 
-            Api::prepareApp(app.getAppId().c_str());
+            Api::prepareApp(app.getAppId());
         }
         RUNNER_ASSERT_MSG(thread_errors.empty(), std::endl << thread_errors);
         exit(0);
     } else {
         waitPid(pid);
-        Api::cleanupApp(app.getAppId().c_str(), tmpUser.getUid(), pid);
+        Api::cleanupApp(app.getAppId(), tmpUser.getUid(), pid);
     }
 }
 
@@ -225,7 +225,7 @@ RUNNER_CHILD_TEST(security_manager_101_create_namespace_test)
         synchPipe.claimParentEp();
         RUNNER_ASSERT_ERRNO_MSG(setLauncherSecurityAttributes(tmpUser) == 0, "launcher failed");
         Api::prepareAppCandidate();
-        Api::prepareApp(app.getAppId().c_str());
+        Api::prepareApp(app.getAppId());
         synchPipe.post();
         synchPipe.wait();
 
@@ -252,7 +252,7 @@ RUNNER_CHILD_TEST(security_manager_101_create_namespace_test)
 
         synchPipe.post();
         waitPid(pid);
-        Api::cleanupApp(app.getAppId().c_str(), tmpUser.getUid(), pid);
+        Api::cleanupApp(app.getAppId(), tmpUser.getUid(), pid);
     }
 }
 
@@ -271,7 +271,7 @@ RUNNER_CHILD_TEST(security_manager_102_check_propagation_test)
         synchPipe.claimParentEp();
         RUNNER_ASSERT_ERRNO_MSG(setLauncherSecurityAttributes(tmpUser) == 0, "launcher failed");
         Api::prepareAppCandidate();
-        Api::prepareApp(app.getAppId().c_str());
+        Api::prepareApp(app.getAppId());
         synchPipe.post();
         synchPipe.wait();
 
@@ -296,7 +296,7 @@ RUNNER_CHILD_TEST(security_manager_102_check_propagation_test)
 
         synchPipe.post();
         waitPid(pid);
-        Api::cleanupApp(app.getAppId().c_str(), tmpUser.getUid(), pid);
+        Api::cleanupApp(app.getAppId(), tmpUser.getUid(), pid);
     }
 }
 
@@ -316,7 +316,7 @@ RUNNER_CHILD_TEST(security_manager_103_policy_change_test)
         synchPipe.claimParentEp();
         RUNNER_ASSERT_ERRNO_MSG(setLauncherSecurityAttributes(tmpUser) == 0, "launcher failed");
         Api::prepareAppCandidate();
-        Api::prepareApp(app.getAppId().c_str());
+        Api::prepareApp(app.getAppId());
         synchPipe.post();
         synchPipe.wait();
 
@@ -367,7 +367,7 @@ RUNNER_CHILD_TEST(security_manager_103_policy_change_test)
 
         synchPipe.post();
         waitPid(pid);
-        Api::cleanupApp(app.getAppId().c_str(), tmpUser.getUid(), pid);
+        Api::cleanupApp(app.getAppId(), tmpUser.getUid(), pid);
     }
 }