From f754c47677b02ae5149d670bfd03359acb5ba794 Mon Sep 17 00:00:00 2001 From: lvchao_2580 Date: Mon, 4 Aug 2025 14:31:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=95=8F=E6=84=9F=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lvchao_2580 --- .../service/test/object_asset_loader_test.cpp | 2 +- .../service/test/object_asset_machine_test.cpp | 2 +- .../service/test/object_manager_test.cpp | 4 ++-- .../service/test/object_service_impl_test.cpp | 8 ++++---- .../service/test/object_snapshot_test.cpp | 18 +++++++++--------- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/services/distributeddataservice/service/test/object_asset_loader_test.cpp b/services/distributeddataservice/service/test/object_asset_loader_test.cpp index 78b92d7c4..dc5188fa0 100644 --- a/services/distributeddataservice/service/test/object_asset_loader_test.cpp +++ b/services/distributeddataservice/service/test/object_asset_loader_test.cpp @@ -43,7 +43,7 @@ protected: void ObjectAssetLoaderTest::SetUp() { - uri_ = "file:://com.example.hmos.notepad/data/storage/el2/distributedfiles/dir/asset1.jpg"; + uri_ = "file:://com.example.notepad/data/storage/el2/distributedfiles/dir/asset1.jpg"; Asset asset{ .name = "test_name", .uri = uri_, diff --git a/services/distributeddataservice/service/test/object_asset_machine_test.cpp b/services/distributeddataservice/service/test/object_asset_machine_test.cpp index 6ee9d39fe..071a5eab4 100644 --- a/services/distributeddataservice/service/test/object_asset_machine_test.cpp +++ b/services/distributeddataservice/service/test/object_asset_machine_test.cpp @@ -53,7 +53,7 @@ void ObjectAssetMachineTest::SetUpTestCase(void) void ObjectAssetMachineTest::SetUp() { - uri_ = "file:://com.huawei.hmos.notepad/data/storage/el2/distributedfiles/dir/asset1.jpg"; + uri_ = "file:://com.examples.notepad/data/storage/el2/distributedfiles/dir/asset1.jpg"; Asset asset{ .name = "test_name", .uri = uri_, diff --git a/services/distributeddataservice/service/test/object_manager_test.cpp b/services/distributeddataservice/service/test/object_manager_test.cpp index e375928a4..28ca499d6 100644 --- a/services/distributeddataservice/service/test/object_manager_test.cpp +++ b/services/distributeddataservice/service/test/object_manager_test.cpp @@ -205,7 +205,7 @@ protected: uint64_t sequenceId_2 = 20; uint64_t sequenceId_3 = 30; std::string userId_ = "100"; - std::string bundleName_ = "com.examples.hmos.notepad"; + std::string bundleName_ = "com.examples.notepad"; OHOS::ObjectStore::AssetBindInfo assetBindInfo_; pid_t pid_ = 10; uint32_t tokenId_ = 100; @@ -215,7 +215,7 @@ protected: void ObjectManagerTest::SetUp() { - uri_ = "file:://com.examples.hmos.notepad/data/storage/el2/distributedfiles/dir/asset1.jpg"; + uri_ = "file:://com.examples.notepad/data/storage/el2/distributedfiles/dir/asset1.jpg"; Asset asset{ .name = "test_name", .uri = uri_, diff --git a/services/distributeddataservice/service/test/object_service_impl_test.cpp b/services/distributeddataservice/service/test/object_service_impl_test.cpp index d433822af..79bd608f9 100644 --- a/services/distributeddataservice/service/test/object_service_impl_test.cpp +++ b/services/distributeddataservice/service/test/object_service_impl_test.cpp @@ -53,7 +53,7 @@ protected: void ObjectServiceImplTest::SetUp() { - uri_ = "file:://com.examples.hmos.notepad/data/storage/el2/distributedfiles/dir/asset1.jpg"; + uri_ = "file:://com.examples.notepad/data/storage/el2/distributedfiles/dir/asset1.jpg"; ObjectStore::Asset asset{ .id = "test_name", .name = uri_, @@ -93,7 +93,7 @@ void ObjectServiceImplTest::TearDown() */ HWTEST_F(ObjectServiceImplTest, OnAssetChanged001, TestSize.Level1) { - std::string bundleName = "com.examples.hmos.notepad"; + std::string bundleName = "com.examples.notepad"; OHOS::Security::AccessToken::AccessTokenID tokenId = OHOS::Security::AccessToken::AccessTokenKit::GetHapTokenID(100, bundleName, 0); SetSelfTokenID(tokenId); @@ -112,7 +112,7 @@ HWTEST_F(ObjectServiceImplTest, OnAssetChanged001, TestSize.Level1) */ HWTEST_F(ObjectServiceImplTest, BindAssetStore001, TestSize.Level1) { - std::string bundleName = "com.examples.hmos.notepad"; + std::string bundleName = "com.examples.notepad"; OHOS::Security::AccessToken::AccessTokenID tokenId = OHOS::Security::AccessToken::AccessTokenKit::GetHapTokenID(100, bundleName, 0); SetSelfTokenID(tokenId); @@ -131,7 +131,7 @@ HWTEST_F(ObjectServiceImplTest, BindAssetStore001, TestSize.Level1) */ HWTEST_F(ObjectServiceImplTest, DeleteSnapshot001, TestSize.Level1) { - std::string bundleName = "com.examples.hmos.notepad"; + std::string bundleName = "com.examples.notepad"; OHOS::Security::AccessToken::AccessTokenID tokenId = OHOS::Security::AccessToken::AccessTokenKit::GetHapTokenID(100, bundleName, 0); SetSelfTokenID(tokenId); diff --git a/services/distributeddataservice/service/test/object_snapshot_test.cpp b/services/distributeddataservice/service/test/object_snapshot_test.cpp index 37cee3e9c..0826280fb 100644 --- a/services/distributeddataservice/service/test/object_snapshot_test.cpp +++ b/services/distributeddataservice/service/test/object_snapshot_test.cpp @@ -41,7 +41,7 @@ protected: void ObjectSnapshotTest::SetUp() { - uri_ = "file:://com.example.hmos.notepad/data/storage/el2/distributedfiles/dir/asset1.jpg"; + uri_ = "file:://com.example.notepad/data/storage/el2/distributedfiles/dir/asset1.jpg"; Asset asset{ .name = "test_name", .uri = uri_, @@ -85,7 +85,7 @@ HWTEST_F(ObjectSnapshotTest, UploadTest001, TestSize.Level0) auto snapshot = std::make_shared(); Asset asset{ .name = "test_name", - .uri = "file:://com.example.hmos.notepad/data/storage/el2/distributedfiles/dir/asset2.jpg", + .uri = "file:://com.example.notepad/data/storage/el2/distributedfiles/dir/asset2.jpg", .modifyTime = "modifyTime1", .size = "size1", .hash = "modifyTime1_size1", @@ -124,7 +124,7 @@ HWTEST_F(ObjectSnapshotTest, DownloadTest001, TestSize.Level0) auto snapshot = std::make_shared(); Asset asset{ .name = "test_name", - .uri = "file:://com.example.hmos.notepad/data/storage/el2/distributedfiles/dir/asset2.jpg", + .uri = "file:://com.example.notepad/data/storage/el2/distributedfiles/dir/asset2.jpg", .modifyTime = "modifyTime1", .size = "size1", .hash = "modifyTime1_size1", @@ -163,7 +163,7 @@ HWTEST_F(ObjectSnapshotTest, GetAssetStatusTest001, TestSize.Level0) auto snapshot = std::make_shared(); Asset asset{ .name = "test_name", - .uri = "file:://com.example.hmos.notepad/data/storage/el2/distributedfiles/dir/asset2.jpg", + .uri = "file:://com.example.notepad/data/storage/el2/distributedfiles/dir/asset2.jpg", .modifyTime = "modifyTime1", .size = "size1", .hash = "modifyTime1_size1", @@ -202,7 +202,7 @@ HWTEST_F(ObjectSnapshotTest, UploadedTest001, TestSize.Level0) auto snapshot = std::make_shared(); Asset asset{ .name = "test_name", - .uri = "file:://com.example.hmos.notepad/data/storage/el2/distributedfiles/dir/asset2.jpg", + .uri = "file:://com.example.notepad/data/storage/el2/distributedfiles/dir/asset2.jpg", .modifyTime = "modifyTime1", .size = "size1", .hash = "modifyTime1_size1", @@ -241,7 +241,7 @@ HWTEST_F(ObjectSnapshotTest, DownloadedTest001, TestSize.Level0) auto snapshot = std::make_shared(); Asset asset{ .name = "test_name", - .uri = "file:://com.example.hmos.notepad/data/storage/el2/distributedfiles/dir/asset2.jpg", + .uri = "file:://com.example.notepad/data/storage/el2/distributedfiles/dir/asset2.jpg", .modifyTime = "modifyTime1", .size = "size1", .hash = "modifyTime1_size1", @@ -280,7 +280,7 @@ HWTEST_F(ObjectSnapshotTest, TransferredTest001, TestSize.Level0) auto snapshot = std::make_shared(); Asset asset{ .name = "test_name", - .uri = "file:://com.example.hmos.notepad/data/storage/el2/distributedfiles/dir/asset2.jpg", + .uri = "file:://com.example.notepad/data/storage/el2/distributedfiles/dir/asset2.jpg", .modifyTime = "modifyTime1", .size = "size1", .hash = "modifyTime1_size1", @@ -320,7 +320,7 @@ HWTEST_F(ObjectSnapshotTest, OnDataChangedTest001, TestSize.Level0) std::string deviceId = "object_snapshot_test_1"; Asset asset{ .name = "test_name", - .uri = "file:://com.example.hmos.notepad/data/storage/el2/distributedfiles/dir/asset2.jpg", + .uri = "file:://com.example.notepad/data/storage/el2/distributedfiles/dir/asset2.jpg", .modifyTime = "modifyTime1", .size = "size1", .hash = "modifyTime1_size1", @@ -360,7 +360,7 @@ HWTEST_F(ObjectSnapshotTest, BindAsset001, TestSize.Level0) auto snapshot = std::make_shared(); Asset asset{ .name = "test_name", - .uri = "file:://com.example.hmos.notepad/data/storage/el2/distributedfiles/dir/asset2.jpg", + .uri = "file:://com.example.notepad/data/storage/el2/distributedfiles/dir/asset2.jpg", .modifyTime = "modifyTime1", .size = "size1", .hash = "modifyTime1_size1", -- Gitee