提交 a7aaadb6 编写于 作者: Y yanglifeng1217

<modified>

Signed-off-by: Nyanglifeng1217 <yanglifeng5@huawei.com>
上级 57a5fd41
...@@ -341,9 +341,9 @@ describe('rdbStoreDistributedTest', function () { ...@@ -341,9 +341,9 @@ describe('rdbStoreDistributedTest', function () {
* @tc.number SUB_DDM_AppDataFWK_JSRDB_Distributed_012 * @tc.number SUB_DDM_AppDataFWK_JSRDB_Distributed_012
* @tc.desc subscribe test * @tc.desc subscribe test
*/ */
it('testRdbStoreDistributed0012', 0, async function (done) { it('testRdbStoreDistributed0012', 0, async function (done) {
console.info(TAG + "************* testRdbStoreDistributed0012 start *************"); console.info(TAG + "************* testRdbStoreDistributed0012 start *************");
rdbStore.on("dataChange", (device) => { rdbStore.on("dataChange", dataRdb.SubscribeType.SUBSCRIBE_TYPE_REMOTE, (device) => {
console.info(TAG + device + " dataChange"); console.info(TAG + device + " dataChange");
}); });
console.info(TAG + "on dataChange success"); console.info(TAG + "on dataChange success");
...@@ -359,7 +359,7 @@ describe('rdbStoreDistributedTest', function () { ...@@ -359,7 +359,7 @@ describe('rdbStoreDistributedTest', function () {
*/ */
it('testRdbStoreDistributed0013', 0, async function (done) { it('testRdbStoreDistributed0013', 0, async function (done) {
console.info(TAG + "************* testRdbStoreDistributed0013 start *************"); console.info(TAG + "************* testRdbStoreDistributed0013 start *************");
rdbStore.off("dataChange", (device) => { rdbStore.off("dataChange", dataRdb.SubscribeType.SUBSCRIBE_TYPE_REMOTE, (device) => {
console.info(TAG + device + " dataChange"); console.info(TAG + device + " dataChange");
}); });
console.info(TAG + "off dataChange success"); console.info(TAG + "off dataChange success");
......
...@@ -168,14 +168,17 @@ describe('rdbEncryptTest', function () { ...@@ -168,14 +168,17 @@ describe('rdbEncryptTest', function () {
* @tc.number SUB_DDM_RDB_JS_RdbEncryptTest_0040 * @tc.number SUB_DDM_RDB_JS_RdbEncryptTest_0040
* @tc.desc RDB Encrypt function test * @tc.desc RDB Encrypt function test
*/ */
it('RdbEncryptTest_0040', 0, async function (done) { it('RdbEncryptTest_0040', 0, async function (done) {
console.info(TAG + "************* RdbEncryptTest_0040 start *************") console.info(TAG + "************* RdbEncryptTest_0040 start *************")
context = ability_featureAbility.getContext() context = ability_featureAbility.getContext()
rdbStore = await CreatRdbStore(context, STORE_CONFIG_ENCRYPT) rdbStore = await CreatRdbStore(context, STORE_CONFIG_ENCRYPT)
rdbStore = null rdbStore = null
rdbStore = await CreatRdbStore(context, STORE_CONFIG_WRONG) try {
expect(rdbStore).assertNull rdbStore = await CreatRdbStore(context, STORE_CONFIG_WRONG)
} catch (err) {
console.info(TAG + `catch err: ` + err)
expect(err).assertTrue
}
done() done()
console.info(TAG + "************* RdbEncryptTest_0040 end *************") console.info(TAG + "************* RdbEncryptTest_0040 end *************")
}) })
......
...@@ -343,9 +343,9 @@ describe('relationalStoreDistributedTest', function () { ...@@ -343,9 +343,9 @@ describe('relationalStoreDistributedTest', function () {
* @tc.number SUB_DDM_AppDataFWK_JSRelationalStore_Distributed_012 * @tc.number SUB_DDM_AppDataFWK_JSRelationalStore_Distributed_012
* @tc.desc subscribe test * @tc.desc subscribe test
*/ */
it('testRdbStoreDistributed0012', 0, async function (done) { it('testRdbStoreDistributed0012', 0, async function (done) {
console.info(TAG + "************* testRdbStoreDistributed0012 start *************"); console.info(TAG + "************* testRdbStoreDistributed0012 start *************");
rdbStore.on("dataChange", (device) => { rdbStore.on("dataChange", data_Rdb.SubscribeType.SUBSCRIBE_TYPE_REMOTE, (device) => {
console.info(TAG + device + " dataChange"); console.info(TAG + device + " dataChange");
}); });
console.info(TAG + "on dataChange success"); console.info(TAG + "on dataChange success");
...@@ -361,7 +361,7 @@ describe('relationalStoreDistributedTest', function () { ...@@ -361,7 +361,7 @@ describe('relationalStoreDistributedTest', function () {
*/ */
it('testRdbStoreDistributed0013', 0, async function (done) { it('testRdbStoreDistributed0013', 0, async function (done) {
console.info(TAG + "************* testRdbStoreDistributed0013 start *************"); console.info(TAG + "************* testRdbStoreDistributed0013 start *************");
rdbStore.off("dataChange", (device) => { rdbStore.off("dataChange", data_Rdb.SubscribeType.SUBSCRIBE_TYPE_REMOTE, (device) => {
console.info(TAG + device + " dataChange"); console.info(TAG + device + " dataChange");
}); });
console.info(TAG + "off dataChange success"); console.info(TAG + "off dataChange success");
......
...@@ -171,14 +171,18 @@ describe('relationalStoreEncryptTest', function () { ...@@ -171,14 +171,18 @@ describe('relationalStoreEncryptTest', function () {
* @tc.number SUB_DDM_RelationalStore_JS_RdbEncryptTest_0040 * @tc.number SUB_DDM_RelationalStore_JS_RdbEncryptTest_0040
* @tc.desc RelationalStore Encrypt function test * @tc.desc RelationalStore Encrypt function test
*/ */
it('RdbEncryptTest_0040', 0, async function (done) { it('RdbEncryptTest_0040', 0, async function (done) {
console.info(TAG + "************* RdbEncryptTest_0040 start *************") console.info(TAG + "************* RdbEncryptTest_0040 start *************")
context = ability_featureAbility.getContext() context = ability_featureAbility.getContext()
rdbStore = await CreatRdbStore(context, STORE_CONFIG_ENCRYPT) rdbStore = await CreatRdbStore(context, STORE_CONFIG_ENCRYPT)
rdbStore = null rdbStore = null
rdbStore = await CreatRdbStore(context, STORE_CONFIG_WRONG) try {
expect(rdbStore).assertNull rdbStore = await CreatRdbStore(context, STORE_CONFIG_WRONG)
} catch (err) {
console.info(TAG + `catch err: err.code= ${err.code}, message = ${err.message}`)
expect(err.code === 14800000).assertTrue
}
done() done()
console.info(TAG + "************* RdbEncryptTest_0040 end *************") console.info(TAG + "************* RdbEncryptTest_0040 end *************")
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册