From 4139578d4cc08dbad404a4dc6cc4ae180091a217 Mon Sep 17 00:00:00 2001 From: yanglifeng1217 Date: Mon, 20 Feb 2023 15:43:35 +0800 Subject: [PATCH] Signed-off-by: yanglifeng1217 --- .../hap/src/main/js/test/List.test.js | 2 +- .../js/test/RdbStoreDistributedJsunit.test.js | 30 +------------------ .../js/test/RdbStoreResultSetJsunit.test.js | 8 ++--- .../main/js/test/RdbstoreDeleteJsunit.test.js | 2 +- .../main/js/test/RdbstoreInsertJsunit.test.js | 2 +- ...bstorePredicatesComplexFiledJsunit.test.js | 2 +- .../src/main/js/test/RdbstoreQuery.test.js | 4 +-- .../js/test/RdbstoreRdbstoreJsunit.test.js | 2 +- .../test/RdbstoreStoreExcuteSqlJsunit.test.js | 2 +- .../js/test/RdbstoreTransactionJsunit.test.js | 2 +- .../main/js/test/RdbstoreUpdateJsunit.test.js | 2 +- 11 files changed, 15 insertions(+), 43 deletions(-) diff --git a/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/List.test.js b/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/List.test.js index 84bcde52b..efc32fd2b 100644 --- a/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/List.test.js +++ b/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/List.test.js @@ -1,5 +1,5 @@ /* -* Copyright (c) 2021 Huawei Device Co., Ltd. +* Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbStoreDistributedJsunit.test.js b/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbStoreDistributedJsunit.test.js index 13b05bad9..dd77efee3 100644 --- a/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbStoreDistributedJsunit.test.js +++ b/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbStoreDistributedJsunit.test.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -309,34 +309,6 @@ describe('rdbStoreDistributedTest', function () { done(); console.info(TAG + "************* testRdbStoreDistributed0011 end *************"); }) - - /** - * @tc.name sync test - * @tc.number SUB_DDM_AppDataFWK_JSRDB_Distributed_syncV9_0100 - * @tc.desc sync test - */ - it('SUB_DDM_AppDataFWK_JSRDB_Distributed_syncV9_0100', 0, async function (done) { - console.info(TAG + "************* SUB_DDM_AppDataFWK_JSRDB_Distributed_syncV9_0100 start *************"); - let config = { - name: "secure.db", - securityLevel: dataRdb.SecurityLevel.S1 - } - await dataRdb.getRdbStoreV9(context, config, 1).then(async (store) => { - let predicates = new dataRdb.RdbPredicatesV9("employee") - predicates = predicates.inDevices("12345678abcd"); - try { - store.sync(dataRdb.SyncMode.SYNC_MODE_PUSH, predicates); - } catch (err) { - expect(null).assertFail(); - } - }).catch((err) => { - expect(null).assertFail(); - }) - await dataRdb.deleteRdbStore(context,"secure.db"); - - done(); - console.info(TAG + "************* SUB_DDM_AppDataFWK_JSRDB_Distributed_syncV9_0100 end *************"); - }) /** * @tc.name sync Callback test diff --git a/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbStoreResultSetJsunit.test.js b/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbStoreResultSetJsunit.test.js index e1968d31f..7d7f7a454 100644 --- a/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbStoreResultSetJsunit.test.js +++ b/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbStoreResultSetJsunit.test.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -1652,9 +1652,9 @@ describe('rdbResultSetTest', function () { it('testGetColumnIndex0004', 0, async function (done) { console.info(TAG + '************* testGetColumnIndex0004 start *************'); { - let predicates = await new dataRdb.RdbPredicates('test'); - let resultSet = await rdbStore.query(predicates); - expect(-1).assertEqual(resultSet.getColumnIndex('')); + let predicates = await new dataRdb.RdbPredicates('test') + let resultSet = await rdbStore.query(predicates) + expect(-1).assertEqual(resultSet.getColumnIndex('')) resultSet = null; done(); diff --git a/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbstoreDeleteJsunit.test.js b/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbstoreDeleteJsunit.test.js index 972427160..7f7089c63 100644 --- a/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbstoreDeleteJsunit.test.js +++ b/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbstoreDeleteJsunit.test.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbstoreInsertJsunit.test.js b/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbstoreInsertJsunit.test.js index 440dab92c..77ff84fb5 100644 --- a/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbstoreInsertJsunit.test.js +++ b/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbstoreInsertJsunit.test.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbstorePredicatesComplexFiledJsunit.test.js b/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbstorePredicatesComplexFiledJsunit.test.js index 11958df23..ac2df6d92 100644 --- a/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbstorePredicatesComplexFiledJsunit.test.js +++ b/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbstorePredicatesComplexFiledJsunit.test.js @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' +import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '@ohos/hypium' import dataRdb from '@ohos.data.rdb'; const TAG = "[RDB_JSKITS_TEST]" diff --git a/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbstoreQuery.test.js b/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbstoreQuery.test.js index e2e2461fa..2fd064fb3 100644 --- a/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbstoreQuery.test.js +++ b/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbstoreQuery.test.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -23,7 +23,7 @@ const CREATE_TABLE_TEST = "CREATE TABLE IF NOT EXISTS test (" + "id INTEGER PRIM const STORE_CONFIG = { name: "Query.db", } -const TEST_BUNDLE_NAME="ohos.acts.relationalStorejstest" +const TEST_BUNDLE_NAME="ohos.acts.rdbjstest" var kvManager = null var kvStore = null diff --git a/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbstoreRdbstoreJsunit.test.js b/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbstoreRdbstoreJsunit.test.js index 139d67d08..006aab34d 100644 --- a/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbstoreRdbstoreJsunit.test.js +++ b/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbstoreRdbstoreJsunit.test.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbstoreStoreExcuteSqlJsunit.test.js b/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbstoreStoreExcuteSqlJsunit.test.js index d6ef99fad..948da0641 100644 --- a/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbstoreStoreExcuteSqlJsunit.test.js +++ b/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbstoreStoreExcuteSqlJsunit.test.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbstoreTransactionJsunit.test.js b/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbstoreTransactionJsunit.test.js index 5c3a89475..0b67bd78d 100644 --- a/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbstoreTransactionJsunit.test.js +++ b/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbstoreTransactionJsunit.test.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbstoreUpdateJsunit.test.js b/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbstoreUpdateJsunit.test.js index 07a238733..79d0383a4 100644 --- a/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbstoreUpdateJsunit.test.js +++ b/distributeddatamgr/relationalStoretest/RdbJstest/hap/src/main/js/test/RdbstoreUpdateJsunit.test.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at -- GitLab