Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
df947c10
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
df947c10
编写于
12月 30, 2022
作者:
Y
yanglifeng1217
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
<modified>
Signed-off-by:
N
yanglifeng1217
<
yanglifeng5@huawei.com
>
上级
a924f4d0
变更
18
显示空白变更内容
内联
并排
Showing
18 changed file
with
38 addition
and
38 deletion
+38
-38
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreBackupRestoreCallbackJsunit.test.js
...s/test/RelationalStoreBackupRestoreCallbackJsunit.test.js
+1
-1
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreBackupRestoreWithFAContextJsunit.test.js
...t/RelationalStoreBackupRestoreWithFAContextJsunit.test.js
+1
-1
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreDeleteJsunit.test.js
.../hap/src/main/js/test/RelationalStoreDeleteJsunit.test.js
+1
-1
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreDistributedJsunit.test.js
...src/main/js/test/RelationalStoreDistributedJsunit.test.js
+2
-2
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreEncryptionJsunit.test.js
.../src/main/js/test/RelationalStoreEncryptionJsunit.test.js
+3
-3
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreExcuteSqlJsunit.test.js
...p/src/main/js/test/RelationalStoreExcuteSqlJsunit.test.js
+1
-1
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreInsertJsunit.test.js
.../hap/src/main/js/test/RelationalStoreInsertJsunit.test.js
+1
-1
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreJsunit.test.js
...Jstest/hap/src/main/js/test/RelationalStoreJsunit.test.js
+9
-9
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStorePredicatesComplexFiledJsunit.test.js
.../test/RelationalStorePredicatesComplexFiledJsunit.test.js
+1
-1
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStorePredicatesJoinJsunit.test.js
.../main/js/test/RelationalStorePredicatesJoinJsunit.test.js
+1
-1
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStorePredicatesJsunit.test.js
.../src/main/js/test/RelationalStorePredicatesJsunit.test.js
+1
-1
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreQuery.test.js
...eJstest/hap/src/main/js/test/RelationalStoreQuery.test.js
+1
-1
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreResultSetJsunit.test.js
...p/src/main/js/test/RelationalStoreResultSetJsunit.test.js
+1
-1
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreTransactionJsunit.test.js
...src/main/js/test/RelationalStoreTransactionJsunit.test.js
+1
-1
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreUpdateJsunit.test.js
.../hap/src/main/js/test/RelationalStoreUpdateJsunit.test.js
+1
-1
distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/test/relationalStoreDistributedEtsunit.test.ets
.../main/ets/test/relationalStoreDistributedEtsunit.test.ets
+1
-1
distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/test/relationalStoreEtsunit.test.ets
...t/entry/src/main/ets/test/relationalStoreEtsunit.test.ets
+10
-10
distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/test/relationalStoreTestResultsetEtsunit.test.ets
...ain/ets/test/relationalStoreTestResultsetEtsunit.test.ets
+1
-1
未找到文件。
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreBackupRestoreCallbackJsunit.test.js
浏览文件 @
df947c10
...
...
@@ -30,7 +30,7 @@ const STORE_CONFIG = {
const
DATABASE_BACKUP_NAME
=
"
Backup.db
"
async
function
CreatRdbStore
(
context
,
STORE_CONFIG
)
{
let
RdbStore
=
await
data_Rdb
.
getRdbStore
(
context
,
STORE_CONFIG
,
1
)
let
RdbStore
=
await
data_Rdb
.
getRdbStore
(
context
,
STORE_CONFIG
)
await
RdbStore
.
executeSql
(
CREATE_TABLE_TEST
,
null
)
let
u8
=
new
Uint8Array
([
1
,
2
,
3
])
{
...
...
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreBackupRestoreWithFAContextJsunit.test.js
浏览文件 @
df947c10
...
...
@@ -30,7 +30,7 @@ const STORE_CONFIG = {
const
DATABASE_BACKUP_NAME
=
"
Backup.db
"
async
function
CreatRdbStore
(
context
,
STORE_CONFIG
)
{
let
RdbStore
=
await
data_Rdb
.
getRdbStore
(
context
,
STORE_CONFIG
,
1
)
let
RdbStore
=
await
data_Rdb
.
getRdbStore
(
context
,
STORE_CONFIG
)
await
RdbStore
.
executeSql
(
CREATE_TABLE_TEST
,
null
)
let
u8
=
new
Uint8Array
([
1
,
2
,
3
])
{
...
...
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreDeleteJsunit.test.js
浏览文件 @
df947c10
...
...
@@ -34,7 +34,7 @@ describe('relationalStoreDeleteTest', function () {
beforeEach
(
async
function
()
{
console
.
info
(
TAG
+
'
beforeEach
'
)
rdbStore
=
await
data_Rdb
.
getRdbStore
(
context
,
STORE_CONFIG
,
1
);
rdbStore
=
await
data_Rdb
.
getRdbStore
(
context
,
STORE_CONFIG
);
await
rdbStore
.
executeSql
(
CREATE_TABLE_TEST
,
null
);
})
...
...
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreDistributedJsunit.test.js
浏览文件 @
df947c10
...
...
@@ -67,7 +67,7 @@ export default function relationalStoreDistributedTest() {
describe
(
'
relationalStoreDistributedTest
'
,
function
()
{
beforeAll
(
async
function
()
{
console
.
info
(
TAG
+
'
beforeAll
'
)
rdbStore
=
await
data_Rdb
.
getRdbStore
(
context
,
config
,
1
);
rdbStore
=
await
data_Rdb
.
getRdbStore
(
context
,
config
);
console
.
info
(
TAG
+
"
create RelationalStore store success
"
)
await
executeSql1
()
await
executeSql2
()
...
...
@@ -399,7 +399,7 @@ describe('relationalStoreDistributedTest', function () {
"
name
"
:
STORE_NAME
,
securityLevel
:
data_Rdb
.
SecurityLevel
.
S1
}
rdbStore
=
await
data_Rdb
.
getRdbStore
(
context
,
config
,
1
);
rdbStore
=
await
data_Rdb
.
getRdbStore
(
context
,
config
);
let
errInfo
=
undefined
try
{
rdbStore
.
obtainDistributedTableName
([
"
deviceId
"
],
"
EMPLOYEE
"
)
...
...
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreEncryptionJsunit.test.js
浏览文件 @
df947c10
...
...
@@ -41,7 +41,7 @@ const STORE_CONFIG_WRONG = {
export
default
function
relationalStoreEncryptTest
()
{
async
function
CreatRdbStore
(
context
,
STORE_CONFIG
)
{
let
rdbStore
=
await
data_rdb
.
getRdbStore
(
context
,
STORE_CONFIG
,
1
)
let
rdbStore
=
await
data_rdb
.
getRdbStore
(
context
,
STORE_CONFIG
)
await
rdbStore
.
executeSql
(
CREATE_TABLE_TEST
,
null
)
let
u8
=
new
Uint8Array
([
1
,
2
,
3
])
{
...
...
@@ -107,7 +107,7 @@ describe('relationalStoreEncryptTest', function () {
it
(
'
RdbEncryptTest_0010
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
"
************* RdbEncryptTest_0010 start *************
"
)
context
=
ability_featureAbility
.
getContext
()
data_rdb
.
getRdbStore
(
context
,
STORE_CONFIG_ENCRYPT
,
1
).
then
((
store
)
=>
{
data_rdb
.
getRdbStore
(
context
,
STORE_CONFIG_ENCRYPT
).
then
((
store
)
=>
{
done
()
expect
(
store
!=
null
).
assertTrue
();
}).
catch
((
err
)
=>
{
...
...
@@ -124,7 +124,7 @@ describe('relationalStoreEncryptTest', function () {
it
(
'
RdbEncryptTest_0020
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
"
************* RdbEncryptTest_0020 start *************
"
)
context
=
ability_featureAbility
.
getContext
()
let
storePromise
=
data_rdb
.
getRdbStore
(
context
,
STORE_CONFIG_UNENCRYPT
,
1
);
let
storePromise
=
data_rdb
.
getRdbStore
(
context
,
STORE_CONFIG_UNENCRYPT
);
storePromise
.
then
((
store
)
=>
{
expect
(
store
!=
null
).
assertTrue
();
done
()
...
...
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreExcuteSqlJsunit.test.js
浏览文件 @
df947c10
...
...
@@ -30,7 +30,7 @@ export default function relationalStoreExcuteSqlTest() {
describe
(
'
relationalStoreExcuteSqlTest
'
,
function
()
{
beforeAll
(
async
function
()
{
console
.
info
(
TAG
+
'
beforeAll
'
)
rdbStore
=
await
data_Rdb
.
getRdbStore
(
context
,
STORE_CONFIG
,
1
);
rdbStore
=
await
data_Rdb
.
getRdbStore
(
context
,
STORE_CONFIG
);
await
rdbStore
.
executeSql
(
CREATE_TABLE_TEST
,
null
);
})
...
...
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreInsertJsunit.test.js
浏览文件 @
df947c10
...
...
@@ -37,7 +37,7 @@ export default function relationalStoreInsertTest() {
describe
(
'
relationalStoreInsertTest
'
,
function
()
{
beforeAll
(
async
function
()
{
console
.
info
(
TAG
+
'
beforeAll
'
)
rdbStore
=
await
data_Rdb
.
getRdbStore
(
context
,
STORE_CONFIG
,
1
);
rdbStore
=
await
data_Rdb
.
getRdbStore
(
context
,
STORE_CONFIG
);
await
rdbStore
.
executeSql
(
CREATE_TABLE_TEST
,
null
)
await
rdbStore
.
executeSql
(
CREATE_TABLE_BATCHINSERT_TEST
,
null
);
})
...
...
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreJsunit.test.js
浏览文件 @
df947c10
...
...
@@ -57,7 +57,7 @@ describe('relationalStoreTest', function () {
*/
it
(
'
testRdbStore0001
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
"
************* testRdbStore0001 start *************
"
);
await
data_Rdb
.
getRdbStore
(
context
,
STORE_CONFIG
,
1
).
then
(
async
(
store
)
=>
{
await
data_Rdb
.
getRdbStore
(
context
,
STORE_CONFIG
).
then
(
async
(
store
)
=>
{
try
{
console
.
info
(
TAG
+
"
getRdbStore done:
"
+
store
);
}
catch
(
e
)
{
...
...
@@ -77,7 +77,7 @@ describe('relationalStoreTest', function () {
*/
it
(
'
testRdbStore0002
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
"
************* testRdbStore0002 start *************
"
);
let
storePromise
=
data_Rdb
.
getRdbStore
(
context
,
STORE_CONFIG
,
2
);
let
storePromise
=
data_Rdb
.
getRdbStore
(
context
,
STORE_CONFIG
);
storePromise
.
then
(
async
(
store
)
=>
{
try
{
console
.
info
(
TAG
+
"
getRdbStore done:
"
+
store
);
...
...
@@ -107,7 +107,7 @@ describe('relationalStoreTest', function () {
securityLevel
:
data_Rdb
.
SecurityLevel
.
S1
}
try
{
data_Rdb
.
getRdbStore
(
context
,
storeConfig
,
4
).
then
(
async
(
ret
)
=>
{
data_Rdb
.
getRdbStore
(
context
,
storeConfig
).
then
(
async
(
ret
)
=>
{
console
.
info
(
TAG
+
"
getRdbStore done
"
+
ret
);
expect
(
null
).
assertFail
();
}).
catch
((
err
)
=>
{
...
...
@@ -130,7 +130,7 @@ describe('relationalStoreTest', function () {
it
(
'
testRdbStore0004
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
"
************* testRdbStore0004 start *************
"
);
try
{
let
store
=
await
data_Rdb
.
getRdbStore
(
context
,
STORE_CONFIG
,
1
)
let
store
=
await
data_Rdb
.
getRdbStore
(
context
,
STORE_CONFIG
)
await
store
.
executeSql
(
CREATE_TABLE_TEST
);
await
data_Rdb
.
deleteRdbStore
(
context
,
"
rdbstore.db
"
)
}
catch
(
e
)
{
...
...
@@ -148,7 +148,7 @@ describe('relationalStoreTest', function () {
it
(
'
testRdbStore0005
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
"
************* testRdbStore0005 start *************
"
);
try
{
let
store
=
await
data_Rdb
.
getRdbStore
(
context
,
STORE_CONFIG
,
2
);
let
store
=
await
data_Rdb
.
getRdbStore
(
context
,
STORE_CONFIG
);
console
.
info
(
TAG
+
"
Get rdbstore success
"
)
await
store
.
executeSql
(
CREATE_TABLE_TEST
);
await
data_Rdb
.
deleteRdbStore
(
context
,
"
rdbstore.db
"
)
...
...
@@ -172,7 +172,7 @@ describe('relationalStoreTest', function () {
name
:
"
rdbstorecontext.db
"
,
securityLevel
:
data_Rdb
.
SecurityLevel
.
S1
}
rdbstore
=
await
data_Rdb
.
getRdbStore
(
context
,
STORE_CONFIG
,
1
)
rdbstore
=
await
data_Rdb
.
getRdbStore
(
context
,
STORE_CONFIG
)
console
.
info
(
TAG
+
"
Get rdbstore success
"
)
expect
(
rdbstore
!=
null
).
assertTrue
();
await
data_Rdb
.
deleteRdbStore
(
context
,
STORE_CONFIG
.
name
)
...
...
@@ -198,7 +198,7 @@ describe('relationalStoreTest', function () {
name
:
"
rdbstorecontext.db
"
,
securityLevel
:
data_Rdb
.
SecurityLevel
.
S1
}
rdbstore
=
await
data_Rdb
.
getRdbStore
(
contextApplication
,
STORE_CONFIG
,
1
)
rdbstore
=
await
data_Rdb
.
getRdbStore
(
contextApplication
,
STORE_CONFIG
)
console
.
info
(
TAG
+
"
Get rdbstore success
"
)
expect
(
rdbstore
!=
null
).
assertTrue
();
await
data_Rdb
.
deleteRdbStore
(
context
,
STORE_CONFIG
.
name
)
...
...
@@ -218,7 +218,7 @@ describe('relationalStoreTest', function () {
*/
it
(
'
testRdbStore0008
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
"
************* testRdbStore0008 start *************
"
);
data_Rdb
.
getRdbStore
(
context
,
STORE_CONFIG
,
1
,
async
(
err
,
data
)
=>
{
data_Rdb
.
getRdbStore
(
context
,
STORE_CONFIG
,
async
(
err
,
data
)
=>
{
console
.
info
(
TAG
+
"
getRdbStore finish
"
)
console
.
info
(
TAG
+
"
getRdbStore success:
"
+
data
)
expect
(
data
!=
null
).
assertTrue
();
...
...
@@ -236,7 +236,7 @@ describe('relationalStoreTest', function () {
*/
it
(
'
testRdbStore0009
'
,
0
,
async
function
(
done
){
console
.
info
(
TAG
+
"
************* testRdbStore0009 start *************
"
);
data_Rdb
.
getRdbStore
(
contextApplication
,
STORE_CONFIG
,
1
,
async
(
err
,
data
)
=>
{
data_Rdb
.
getRdbStore
(
contextApplication
,
STORE_CONFIG
,
async
(
err
,
data
)
=>
{
console
.
info
(
TAG
+
"
getRdbStore finish
"
)
console
.
info
(
TAG
+
"
getRdbStore success:
"
+
data
)
expect
(
data
!=
null
).
assertTrue
();
...
...
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStorePredicatesComplexFiledJsunit.test.js
浏览文件 @
df947c10
...
...
@@ -28,7 +28,7 @@ export default function relationalStorePredicatesComplexFiledTest(){
describe
(
'
relationalStorePredicatesComplexFiledTest
'
,
function
()
{
beforeAll
(
async
function
()
{
console
.
info
(
TAG
+
'
beforeAll
'
)
rdbStore
=
await
data_Rdb
.
getRdbStore
(
context
,
STORE_CONFIG
,
1
);
rdbStore
=
await
data_Rdb
.
getRdbStore
(
context
,
STORE_CONFIG
);
await
generateTable
();
})
...
...
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStorePredicatesJoinJsunit.test.js
浏览文件 @
df947c10
...
...
@@ -52,7 +52,7 @@ describe('relationalStorePredicatesJoinTest', function () {
beforeEach
(
async
function
()
{
console
.
info
(
TAG
+
'
beforeEach
'
)
rdbStore
=
await
data_Rdb
.
getRdbStore
(
context
,
STORE_CONFIG
,
CURRENT_STORE_VERSION
);
rdbStore
=
await
data_Rdb
.
getRdbStore
(
context
,
STORE_CONFIG
);
await
generateUserTable
();
await
generateBookTable
();
console
.
info
(
TAG
+
'
beforeEach end
'
)
...
...
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStorePredicatesJsunit.test.js
浏览文件 @
df947c10
...
...
@@ -37,7 +37,7 @@ export default function relationalStorePredicatesTest() {
describe
(
'
relationalStorePredicatesTest
'
,
function
()
{
beforeAll
(
async
function
()
{
console
.
info
(
TAG
+
'
beforeAll
'
)
rdbStore
=
await
data_Rdb
.
getRdbStore
(
context
,
STORE_CONFIG
,
1
);
rdbStore
=
await
data_Rdb
.
getRdbStore
(
context
,
STORE_CONFIG
);
await
rdbStore
.
executeSql
(
CREATE_TABLE_ALL_DATA_TYPE_SQL
,
null
);
await
buildAllDataType1
();
await
buildAllDataType2
();
...
...
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreQuery.test.js
浏览文件 @
df947c10
...
...
@@ -33,7 +33,7 @@ var rdbStore
var
context
=
ability_featureAbility
.
getContext
()
async
function
CreatRdbStore
(
context
,
STORE_CONFIG
)
{
let
RdbStore
=
await
data_Rdb
.
getRdbStore
(
context
,
STORE_CONFIG
,
1
)
let
RdbStore
=
await
data_Rdb
.
getRdbStore
(
context
,
STORE_CONFIG
)
await
RdbStore
.
executeSql
(
CREATE_TABLE_TEST
,
null
)
let
u8
=
new
Uint8Array
([
1
,
2
,
3
])
{
...
...
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreResultSetJsunit.test.js
浏览文件 @
df947c10
...
...
@@ -66,7 +66,7 @@ export default function relationalStoreResultSetTest() {
describe
(
'
relationalStoreResultSetTest
'
,
function
()
{
beforeAll
(
async
function
()
{
console
.
info
(
TAG
+
'
beforeAll
'
)
rdbStore
=
await
data_Rdb
.
getRdbStore
(
context
,
STORE_CONFIG
,
1
);
rdbStore
=
await
data_Rdb
.
getRdbStore
(
context
,
STORE_CONFIG
);
await
rdbStore
.
executeSql
(
CREATE_TABLE_TEST
,
null
);
await
createTest
();
})
...
...
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreTransactionJsunit.test.js
浏览文件 @
df947c10
...
...
@@ -36,7 +36,7 @@ describe('relationalStoreTransactionTest', function () {
beforeEach
(
async
function
()
{
console
.
info
(
TAG
+
'
beforeEach
'
)
rdbStore
=
await
data_Rdb
.
getRdbStore
(
context
,
STORE_CONFIG
,
1
);
rdbStore
=
await
data_Rdb
.
getRdbStore
(
context
,
STORE_CONFIG
);
await
rdbStore
.
executeSql
(
CREATE_TABLE_TEST
,
null
);
})
...
...
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreUpdateJsunit.test.js
浏览文件 @
df947c10
...
...
@@ -33,7 +33,7 @@ describe('relationalStoreUpdateTest', function () {
beforeEach
(
async
function
()
{
console
.
info
(
TAG
+
'
beforeEach
'
)
rdbStore
=
await
data_Rdb
.
getRdbStore
(
context
,
STORE_CONFIG
,
1
);
rdbStore
=
await
data_Rdb
.
getRdbStore
(
context
,
STORE_CONFIG
);
await
rdbStore
.
executeSql
(
CREATE_TABLE_TEST
,
null
);
})
...
...
distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/test/relationalStoreDistributedEtsunit.test.ets
浏览文件 @
df947c10
...
...
@@ -34,7 +34,7 @@ describe('relationalStoreDistributedTest', function () {
})
beforeEach(async function () {
rdbStore = await dataRdb.getRdbStore(context, config
, 1
);
rdbStore = await dataRdb.getRdbStore(context, config);
await rdbStore.executeSql(CREATE_TABLE_TEST, null)
console.info(TAG + 'beforeEach')
})
...
...
distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/test/relationalStoreEtsunit.test.ets
浏览文件 @
df947c10
...
...
@@ -55,7 +55,7 @@ describe('relationalStoreTest', function () {
name: "secure.db",
securityLevel: dataRdb.SecurityLevel.S1
}
let storePromise = dataRdb.getRdbStore(context, config
, 1
);
let storePromise = dataRdb.getRdbStore(context, config);
storePromise.then(async (store) => {
try {
await store.executeSql(CREATE_TABLE_TEST);
...
...
@@ -84,7 +84,7 @@ describe('relationalStoreTest', function () {
name: "secure.db",
securityLevel: dataRdb.SecurityLevel.S2
}
let storePromise = dataRdb.getRdbStore(context, config
, 1
);
let storePromise = dataRdb.getRdbStore(context, config);
storePromise.then(async (store) => {
try {
await store.executeSql(CREATE_TABLE_TEST);
...
...
@@ -113,7 +113,7 @@ describe('relationalStoreTest', function () {
name: "secure.db",
securityLevel: dataRdb.SecurityLevel.S3
}
let storePromise = dataRdb.getRdbStore(context, config
, 1
);
let storePromise = dataRdb.getRdbStore(context, config);
storePromise.then(async (store) => {
try {
await store.executeSql(CREATE_TABLE_TEST);
...
...
@@ -142,7 +142,7 @@ describe('relationalStoreTest', function () {
name: "secure.db",
securityLevel: dataRdb.SecurityLevel.S4
}
let storePromise = dataRdb.getRdbStore(context, config
, 1
);
let storePromise = dataRdb.getRdbStore(context, config);
storePromise.then(async (store) => {
try {
await store.executeSql(CREATE_TABLE_TEST);
...
...
@@ -171,7 +171,7 @@ describe('relationalStoreTest', function () {
name: "secure.db",
securityLevel: dataRdb.SecurityLevel.S1
}
dataRdb.getRdbStore(context, config,
1,
async (err,data) => {
dataRdb.getRdbStore(context, config, async (err,data) => {
if(err != null){
console.info(TAG + "get rdb store error" + err.message)
expect(null).assertFail();
...
...
@@ -198,7 +198,7 @@ describe('relationalStoreTest', function () {
name: "secure.db",
securityLevel: dataRdb.SecurityLevel.S2
}
dataRdb.getRdbStore(context, config,
1,
async (err,data) => {
dataRdb.getRdbStore(context, config,async (err,data) => {
if(err != null){
console.info(TAG + "get rdb store error")
expect(null).assertFail();
...
...
@@ -224,7 +224,7 @@ describe('relationalStoreTest', function () {
name: "secure.db",
securityLevel: dataRdb.SecurityLevel.S3
}
dataRdb.getRdbStore(context, config,
1,
async (err,data) => {
dataRdb.getRdbStore(context, config,async (err,data) => {
if(err != null){
console.info(TAG + "get rdb store error")
expect(null).assertFail();
...
...
@@ -250,7 +250,7 @@ describe('relationalStoreTest', function () {
name: "secure.db",
securityLevel: dataRdb.SecurityLevel.S4
}
dataRdb.getRdbStore(context, config,
1,
async (err,data) => {
dataRdb.getRdbStore(context, config,async (err,data) => {
if(err != null){
console.info(TAG + "get rdb store error")
expect(null).assertFail();
...
...
@@ -277,7 +277,7 @@ describe('relationalStoreTest', function () {
securityLevel: dataRdb.SecurityLevel.S4
}
let deleteResult = false
await dataRdb.getRdbStore(context, config
, 1
).then(async (store) => {
await dataRdb.getRdbStore(context, config).then(async (store) => {
console.info(TAG + "create table success")
})
await dataRdb.deleteRdbStore(context,"secure.db").then(() => {
...
...
@@ -302,7 +302,7 @@ describe('relationalStoreTest', function () {
securityLevel: dataRdb.SecurityLevel.S1
}
let deleteResult = false
await dataRdb.getRdbStore(context, config
, 1
).then(async (store) => {
await dataRdb.getRdbStore(context, config).then(async (store) => {
console.info(TAG + "create rdb store success")
})
dataRdb.deleteRdbStore(context,"secure.db", (err, data) => {
...
...
distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/test/relationalStoreTestResultsetEtsunit.test.ets
浏览文件 @
df947c10
...
...
@@ -29,7 +29,7 @@ export default function relationalStoreResultSetTest(context) {
describe
(
'relationalStoreResultSetTest'
,
function
()
{
beforeAll
(
async
function
()
{
console
.
info
(
TAG
+
'beforeAll'
)
rdbStore
=
await
dataRdb
.
getRdbStore
(
context
,
STORE_CONFIG
,
1
);
rdbStore
=
await
dataRdb
.
getRdbStore
(
context
,
STORE_CONFIG
);
await
rdbStore
.
executeSql
(
CREATE_TABLE_TEST
,
null
);
await
createTest
();
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录