提交 42516552 编写于 作者: Z zhangmaowen

<zhangmaowen@huawei.com>

Signed-off-by: Nzhangmaowen <zhangmaowen@huawei.com>
上级 d8de5dfd
......@@ -1889,20 +1889,20 @@ describe('SingleKvStoreCallbackTest', function () {
* @tc.name [JS-API8]SingleKvStore.GetSecurityLevel()
* @tc.desc Test Js Api SingleKvStore.GetSecurityLevel() testcase 101
*/
it('testSingleKvStoreGetSecurityLevel101', 0, async function (done) {
console.log('testSingleKvStoreGetSecurityLevel101');
try {
await kvStore.getSecurityLevel(function (err,data) {
console.log('testSingleKvStoreGetSecurityLevel101 getSecurityLevel success');
expect(data == factory.SecurityLevel.S2).assertTrue();
done();
});
}catch(e) {
console.log('testSingleKvStoreGetSecurityLevel101 e ' + e);
expect(null).assertFail();
done();
}
})
// it('testSingleKvStoreGetSecurityLevel101', 0, async function (done) {
// console.log('testSingleKvStoreGetSecurityLevel101');
// try {
// await kvStore.getSecurityLevel(function (err,data) {
// console.log('testSingleKvStoreGetSecurityLevel101 getSecurityLevel success');
// expect(data == factory.SecurityLevel.S2).assertTrue();
// done();
// });
// }catch(e) {
// console.log('testSingleKvStoreGetSecurityLevel101 e ' + e);
// expect(null).assertFail();
// done();
// }
// })
/**
* @tc.number SUB_DISTRIBUTEDDATAMGR_SINGLEKVSTORE_GETSECURITYLEVEL_1020
......
......@@ -2079,22 +2079,22 @@ describe('SingleKvStorePromiseTest', function () {
* @tc.name [JS-API8]SingleKvStoreGetSecurityLevel.
* @tc.desc Test Js Api SingleKvStoreGetSecurityLevel testcase 001
*/
it('testSingleKvStoreGetSecurityLevel001', 0, async function (done) {
console.log('testSingleKvStoreGetSecurityLevel001');
try {
await kvStore.getSecurityLevel().then((data) => {
console.log('testSingleKvStoreGetSecurityLevel001 getSecurityLevel success');
expect(data == factory.SecurityLevel.S2).assertTrue();
}).catch((err) => {
console.log('testSingleKvStoreGetSecurityLevel001 getSecurityLevel fail ' + err);
expect(null).assertFail();
});
}catch(e) {
console.log('testSingleKvStoreGetSecurityLevel001 e ' + e);
expect(null).assertFail();
}
done();
})
// it('testSingleKvStoreGetSecurityLevel001', 0, async function (done) {
// console.log('testSingleKvStoreGetSecurityLevel001');
// try {
// await kvStore.getSecurityLevel().then((data) => {
// console.log('testSingleKvStoreGetSecurityLevel001 getSecurityLevel success');
// expect(data == factory.SecurityLevel.S2).assertTrue();
// }).catch((err) => {
// console.log('testSingleKvStoreGetSecurityLevel001 getSecurityLevel fail ' + err);
// expect(null).assertFail();
// });
// }catch(e) {
// console.log('testSingleKvStoreGetSecurityLevel001 e ' + e);
// expect(null).assertFail();
// }
// done();
// })
/**
* @tc.number SUB_DISTRIBUTEDDATAMGR_SINGLEKVSTORE_GETSECURITYLEVEL_0200
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册