Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
cffbdfb7
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
cffbdfb7
编写于
8月 15, 2022
作者:
O
openharmony_ci
提交者:
Gitee
8月 15, 2022
浏览文件
操作
浏览文件
下载
差异文件
!4955 修改storage模块部件化
Merge pull request !4955 from raoxian/master
上级
07abd6aa
f18deaeb
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
53 addition
and
57 deletion
+53
-57
storage/storagefileioerrorjstest/BUILD.gn
storage/storagefileioerrorjstest/BUILD.gn
+2
-2
storage/storagefileioerrorjstest/src/main/js/test/FileIOError.test.js
...agefileioerrorjstest/src/main/js/test/FileIOError.test.js
+41
-45
storage/storagefileiojstest/BUILD.gn
storage/storagefileiojstest/BUILD.gn
+2
-2
storage/storagefilejstest/BUILD.gn
storage/storagefilejstest/BUILD.gn
+2
-2
storage/storagesecuritylabeljstest/BUILD.gn
storage/storagesecuritylabeljstest/BUILD.gn
+2
-2
storage/storagestatfsjstest/BUILD.gn
storage/storagestatfsjstest/BUILD.gn
+2
-2
storage/storagestatisticsjstest/BUILD.gn
storage/storagestatisticsjstest/BUILD.gn
+2
-2
未找到文件。
storage/storagefileioerrorjstest/BUILD.gn
浏览文件 @
cffbdfb7
...
...
@@ -21,8 +21,8 @@ ohos_js_hap_suite("storagefileioerror_js_test") {
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsStorageFileIoErrorJsTest"
subsystem_name = "
xts
"
part_name = "
xts_act
s"
subsystem_name = "
distributeddatamgr
"
part_name = "
distributedfilej
s"
}
ohos_js_assets("storagefileioerror_js_assets") {
js2abc = true
...
...
storage/storagefileioerrorjstest/src/main/js/test/FileIOError.test.js
浏览文件 @
cffbdfb7
...
...
@@ -36,23 +36,24 @@ describe('FileIOError', function () {
/**
* @tc.number SUB_STORAGE_FileIo_test_error_0000
* @tc.name fileio_test_error_000
* @tc.desc Function of API, Delete directories with files
* @tc.desc Function of API, delete file
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
* @tc.require
*/
it
(
'
fileio_test_error_000
'
,
0
,
async
function
(
done
)
{
let
dpath
=
await
fileName
(
'
fileio_test_error_000d
'
);
let
fpath
=
dpath
+
'
/fileio_test_error_000f
'
;
fileio
.
mkdirSync
(
dpath
);
let
fpath
=
await
fileName
(
'
fileio_test_error_000f
'
);
expect
(
prepareFile
(
fpath
,
'
hello
'
)).
assertTrue
();
try
{
let
fd
=
fileio
.
openSync
(
d
path
);
let
fd
=
fileio
.
openSync
(
f
path
);
expect
(
isIntNum
(
fd
)).
assertTrue
();
fileio
.
rmdirSync
(
d
path
);
fileio
.
rmdirSync
(
f
path
);
}
catch
(
err
)
{
console
.
info
(
'
fileio_test_error_000 has failed for
'
+
err
);
expect
(
isInclude
(
err
.
message
,
'
Directory not empt
y
'
)).
assertTrue
();
expect
(
isInclude
(
err
.
message
,
'
Not a director
y
'
)).
assertTrue
();
fileio
.
unlinkSync
(
fpath
);
fileio
.
rmdirSync
(
dpath
);
done
();
}
});
...
...
@@ -60,38 +61,44 @@ describe('FileIOError', function () {
/**
* @tc.number SUB_STORAGE_FileIo_test_error_0100
* @tc.name fileio_test_error_001
* @tc.desc Function of API, delete file
* @tc.desc Function of API, flags=0o100. missing mode parameter.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
* @tc.require
*/
it
(
'
fileio_test_error_001
'
,
0
,
async
function
(
done
)
{
let
fpath
=
await
fileName
(
'
fileio_test_error_001f
'
);
expect
(
prepareFile
(
fpath
,
'
hello
'
)).
assertTrue
();
let
fpath
=
await
nextFileName
(
'
fileio_test_error_001
'
);
expect
(
prepareFile
(
fpath
,
FILE_CONTENT
)).
assertTrue
();
try
{
let
fd
=
fileio
.
openSync
(
fpath
);
expect
(
isIntNum
(
fd
)).
assertTrue
();
fileio
.
rmdirSync
(
fpath
);
fileio
.
openSync
(
fpath
,
0o100
);
}
catch
(
err
)
{
console
.
info
(
'
fileio_test_error_001 has failed for
'
+
err
);
expect
(
isInclude
(
err
.
message
,
'
Not a directory
'
)).
assertTrue
();
expect
(
isInclude
(
err
.
message
,
'
called with O_CREAT/O_TMPFILE but no mode
'
)).
assertTrue
();
fileio
.
unlinkSync
(
fpath
);
done
();
}
});
/**
* @tc.number SUB_STORAGE_FileI
o_test_error
_0200
* @tc.number SUB_STORAGE_FileI
O_OpenSync
_0200
* @tc.name fileio_test_error_002
* @tc.desc Function of API, flags=0o100. missing mode parameter.
* @tc.desc Function of API, flags=0o302. The test file is exist.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
* @tc.require
*/
it
(
'
fileio_test_error_002
'
,
0
,
async
function
(
done
)
{
let
fpath
=
await
nextFileName
(
'
fileio_test_error_002
'
);
expect
(
prepareFile
(
fpath
,
FILE_CONTENT
)).
assertTrue
();
try
{
fileio
.
openSync
(
fpath
,
0o
100
);
fileio
.
openSync
(
fpath
,
0o
302
,
0o666
);
}
catch
(
err
)
{
console
.
info
(
'
fileio_test_error_002 has failed for
'
+
err
);
expect
(
isInclude
(
err
.
message
,
'
called with O_CREAT/O_TMPFILE but no mode
'
)).
assertTrue
();
expect
(
isInclude
(
err
.
message
,
'
File exists
'
)).
assertTrue
();
fileio
.
unlinkSync
(
fpath
);
done
();
}
...
...
@@ -100,29 +107,14 @@ describe('FileIOError', function () {
/**
* @tc.number SUB_STORAGE_FileIO_OpenSync_0300
* @tc.name fileio_test_error_003
* @tc.desc Function of API, flags=0o302. The test file is exist.
* @tc.desc Function of API, flags=0o400000. Symbolic link loop.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
* @tc.require
*/
it
(
'
fileio_test_error_003
'
,
0
,
async
function
(
done
)
{
let
fpath
=
await
nextFileName
(
'
fileio_test_error_003
'
);
expect
(
prepareFile
(
fpath
,
FILE_CONTENT
)).
assertTrue
();
try
{
fileio
.
openSync
(
fpath
,
0o302
,
0o666
);
}
catch
(
err
)
{
console
.
info
(
'
fileio_test_error_003 has failed for
'
+
err
);
expect
(
isInclude
(
err
.
message
,
'
File exists
'
)).
assertTrue
();
fileio
.
unlinkSync
(
fpath
);
done
();
}
});
/**
* @tc.number SUB_STORAGE_FileIO_OpenSync_0400
* @tc.name fileio_test_error_004
* @tc.desc Function of API, flags=0o400000. Symbolic link loop.
*/
it
(
'
fileio_test_error_004
'
,
0
,
async
function
(
done
)
{
let
fpath
=
await
nextFileName
(
'
fileio_test_error_004
'
);
let
ffpath
=
fpath
+
'
aaaa
'
;
expect
(
prepareFile
(
fpath
,
FILE_CONTENT
)).
assertTrue
();
try
{
...
...
@@ -130,7 +122,7 @@ describe('FileIOError', function () {
fileio
.
openSync
(
ffpath
,
0o400000
);
}
catch
(
err
)
{
console
.
info
(
'
fileio_test_error_00
4
has failed for
'
+
err
);
console
.
info
(
'
fileio_test_error_00
3
has failed for
'
+
err
);
expect
(
isInclude
(
err
.
message
,
'
Symbolic link loop
'
)
||
isInclude
(
err
.
message
,
'
Too many symbolic links encountered
'
)).
assertTrue
();
fileio
.
unlinkSync
(
fpath
);
...
...
@@ -140,18 +132,22 @@ describe('FileIOError', function () {
});
/**
* @tc.number SUB_STORAGE_FileIO_OpenSync_0
5
00
* @tc.name fileio_test_error_00
5
* @tc.number SUB_STORAGE_FileIO_OpenSync_0
4
00
* @tc.name fileio_test_error_00
4
* @tc.desc Function of API, flags=0o200000. Not a directory.
* @tc.size MEDIUM
* @tc.type Functoin
* @tc.level Level 0
* @tc.require
*/
it
(
'
fileio_test_error_00
5
'
,
0
,
async
function
(
done
)
{
let
fpath
=
await
nextFileName
(
'
fileio_test_error_00
5
'
);
it
(
'
fileio_test_error_00
4
'
,
0
,
async
function
(
done
)
{
let
fpath
=
await
nextFileName
(
'
fileio_test_error_00
4
'
);
expect
(
prepareFile
(
fpath
,
FILE_CONTENT
)).
assertTrue
();
try
{
fileio
.
openSync
(
fpath
,
0o200000
,
0o666
);
}
catch
(
err
)
{
console
.
info
(
'
fileio_test_error_00
5
has failed for
'
+
err
);
console
.
info
(
'
fileio_test_error_00
4
has failed for
'
+
err
);
expect
(
isInclude
(
err
.
message
,
'
Not a directory
'
)).
assertTrue
();
fileio
.
unlinkSync
(
fpath
);
done
();
...
...
storage/storagefileiojstest/BUILD.gn
浏览文件 @
cffbdfb7
...
...
@@ -21,8 +21,8 @@ ohos_js_hap_suite("storagefileio_js_test") {
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsStorageFileIoJSTest"
subsystem_name = "
xts
"
part_name = "
xts_act
s"
subsystem_name = "
distributeddatamgr
"
part_name = "
distributedfilej
s"
}
ohos_js_assets("storagefileio_js_assets") {
js2abc = true
...
...
storage/storagefilejstest/BUILD.gn
浏览文件 @
cffbdfb7
...
...
@@ -21,8 +21,8 @@ ohos_js_hap_suite("storagefile_js_test") {
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsStorageFileJSTest"
subsystem_name = "
xts
"
part_name = "
xts_act
s"
subsystem_name = "
distributeddatamgr
"
part_name = "
distributedfilej
s"
}
ohos_js_assets("storagefile_js_assets") {
js2abc = true
...
...
storage/storagesecuritylabeljstest/BUILD.gn
浏览文件 @
cffbdfb7
...
...
@@ -21,8 +21,8 @@ ohos_js_hap_suite("storagesecuritylabel_js_test") {
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsStorageSecurityLabelJSTest"
subsystem_name = "
xts
"
part_name = "
xts_act
s"
subsystem_name = "
distributeddatamgr
"
part_name = "
distributedfilej
s"
}
ohos_js_assets("storagesecuritylabel_js_assets") {
js2abc = true
...
...
storage/storagestatfsjstest/BUILD.gn
浏览文件 @
cffbdfb7
...
...
@@ -21,8 +21,8 @@ ohos_js_hap_suite("storagestatfs_js_test") {
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsStorageStatfsJsTest"
subsystem_name = "
xts
"
part_name = "
xts_act
s"
subsystem_name = "
distributeddatamgr
"
part_name = "
distributedfilej
s"
}
ohos_js_assets("storagestatfs_js_assets") {
js2abc = true
...
...
storage/storagestatisticsjstest/BUILD.gn
浏览文件 @
cffbdfb7
...
...
@@ -23,8 +23,8 @@ ohos_js_hap_suite("storagestatistics_js_test") {
ets2abc = true
certificate_profile = "signature/openharmony_sx.p7b"
hap_name = "ActsStorageStatisticsJsTest"
subsystem_name = "
xts
"
part_name = "
xts_acts
"
subsystem_name = "
filemanagement
"
part_name = "
storage_service
"
}
ohos_app_scope("storagestatistics_app_profile") {
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录