提交 a3c5bc84 编写于 作者: Y yanglifeng1217

<add assertion>

Signed-off-by: Nyanglifeng1217 <yanglifeng5@huawei.com>
上级 fdb75676
...@@ -82,6 +82,10 @@ describe('kvManagerCallbackTest', function () { ...@@ -82,6 +82,10 @@ describe('kvManagerCallbackTest', function () {
expect((err == undefined) && (store != null)).assertTrue(); expect((err == undefined) && (store != null)).assertTrue();
console.info('SUB_DDM_DKV_KVMANAGER_GETKVSTORE_0100 getKVStore success'); console.info('SUB_DDM_DKV_KVMANAGER_GETKVSTORE_0100 getKVStore success');
kvStore = store; kvStore = store;
kvStore.getSecurityLevel().then((data) => {
console.info('SUB_DDM_DKV_KVMANAGER_GETKVSTORE_0100 securityLevel = ' + data);
expect((data == factory.SecurityLevel.S2)).assertTrue();
});
done(); done();
}); });
} catch (e) { } catch (e) {
...@@ -105,8 +109,8 @@ describe('kvManagerCallbackTest', function () { ...@@ -105,8 +109,8 @@ describe('kvManagerCallbackTest', function () {
console.info('SUB_DDM_DKV_KVMANAGER_GETKVSTORE_0200 getKVStore success'); console.info('SUB_DDM_DKV_KVMANAGER_GETKVSTORE_0200 getKVStore success');
expect(null).assertFail(); expect(null).assertFail();
} else { } else {
expect((err != undefined)).assertTrue(); expect((err.code == 401)).assertTrue();
console.info('SUB_DDM_DKV_KVMANAGER_GETKVSTORE_0200 getKVStore fail'); console.info('getKVStore fail' + `, error code is ${err.code}, message is ${err.message}`);
} }
done(); done();
}); });
......
...@@ -85,6 +85,10 @@ describe('kvManagerCallbackTest', function () { ...@@ -85,6 +85,10 @@ describe('kvManagerCallbackTest', function () {
expect((err == undefined) && (store != null)).assertTrue(); expect((err == undefined) && (store != null)).assertTrue();
console.info('testKVManagerGetKVStore101 getKVStore success'); console.info('testKVManagerGetKVStore101 getKVStore success');
kvStore = store; kvStore = store;
kvStore.getSecurityLevel().then((data) => {
console.info('testKVManagerGetKVStore101 securityLevel = ' + data);
expect((data == factory.SecurityLevel.S2)).assertTrue();
});
done(); done();
}); });
} catch (e) { } catch (e) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册