Use proper errors when failing to set time

Previously it reports InsufficientPermission when it is not allowed to
set time.

Now phosphor-dbus-interfaces defines proper errors for such case, so
report NotAllowed error when it is not allowed to set time, and report
Failed error when it failed to set time.

Tested: Get NotAllowed and Failed error with expected metadata from
        journal log.

Change-Id: I53610bf27ffc3f62608cea6fd0e66ca859d94675
Signed-off-by: Lei YU <mine260309@gmail.com>
diff --git a/test/TestBmcEpoch.cpp b/test/TestBmcEpoch.cpp
index 2d0bc72..18f3218 100644
--- a/test/TestBmcEpoch.cpp
+++ b/test/TestBmcEpoch.cpp
@@ -6,7 +6,7 @@
 #include <gtest/gtest.h>
 #include <memory>
 #include <sdbusplus/bus.hpp>
-#include <xyz/openbmc_project/Common/error.hpp>
+#include <xyz/openbmc_project/Time/error.hpp>
 
 namespace phosphor
 {
@@ -15,8 +15,8 @@
 
 using ::testing::_;
 using namespace std::chrono;
-using InsufficientPermission =
-    sdbusplus::xyz::openbmc_project::Common::Error::InsufficientPermission;
+using NotAllowed =
+    sdbusplus::xyz::openbmc_project::Time::Error::NotAllowed;
 
 class TestBmcEpoch : public testing::Test
 {
@@ -93,7 +93,7 @@
     setTimeOwner(Owner::Host);
     EXPECT_THROW(
         bmcEpoch->elapsed(epochNow),
-        InsufficientPermission);
+        NotAllowed);
 }
 
 TEST_F(TestBmcEpoch, setElapsedOK)