Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
6147c8f7
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看板
提交
6147c8f7
编写于
5月 20, 2022
作者:
Z
zhangxingxia
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update securitylabel xts
Signed-off-by:
N
zhangxingxia
<
zhangxingxia1@huawei.com
>
上级
6de428ba
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
12 addition
and
12 deletion
+12
-12
storage/storagesecuritylabeljstest/src/main/js/default/test/securitylabel.test.js
...abeljstest/src/main/js/default/test/securitylabel.test.js
+12
-12
未找到文件。
storage/storagesecuritylabeljstest/src/main/js/default/test/securitylabel.test.js
浏览文件 @
6147c8f7
...
...
@@ -37,7 +37,7 @@ describe('securitylabel', function () {
securityLabel
.
setSecurityLabelSync
(
fpath
,
dataLevel
[
i
]);
let
level
=
securityLabel
.
getSecurityLabelSync
(
fpath
);
expect
(
level
==
dataLevel
[
i
]).
assertTrue
();
expect
(
fileio
.
unlinkSync
(
fpath
)
==
null
).
assertTrue
(
);
fileio
.
unlinkSync
(
fpath
);
}
}
catch
(
e
)
{
...
...
@@ -63,7 +63,7 @@ describe('securitylabel', function () {
}
catch
(
err
)
{
console
.
log
(
'
securitylabel_test_set_security_label_sync_001 has failed for
'
+
err
);
expect
(
err
.
message
==
"
Invalid Argument of dataLevelEnum
"
).
assertTrue
();
expect
(
fileio
.
unlinkSync
(
fpath
)
==
null
).
assertTrue
(
);
fileio
.
unlinkSync
(
fpath
);
}
});
...
...
@@ -103,7 +103,7 @@ describe('securitylabel', function () {
}
catch
(
err
)
{
console
.
log
(
'
securitylabel_test_set_security_label_sync_003 has failed for
'
+
err
);
expect
(
err
.
message
==
"
Invalid dataLevel
"
).
assertTrue
();
expect
(
fileio
.
unlinkSync
(
fpath
)
==
null
).
assertTrue
(
);
fileio
.
unlinkSync
(
fpath
);
}
});
...
...
@@ -124,7 +124,7 @@ describe('securitylabel', function () {
}
catch
(
err
)
{
console
.
log
(
'
securitylabel_test_set_security_label_sync_004 has failed for
'
+
err
);
expect
(
err
.
message
==
"
Number of arguments unmatched
"
).
assertTrue
();
expect
(
fileio
.
unlinkSync
(
fpath
)
==
null
).
assertTrue
(
);
fileio
.
unlinkSync
(
fpath
);
}
});
...
...
@@ -145,7 +145,7 @@ describe('securitylabel', function () {
securityLabel
.
setSecurityLabel
(
fpath
,
'
s0
'
,
function
(
err
)
{
securityLabel
.
getSecurityLabel
(
fpath
,
function
(
err
,
dataLevel
)
{
expect
(
dataLevel
==
'
s0
'
).
assertTrue
();
expect
(
fileio
.
unlinkSync
(
fpath
)
==
null
).
assertTrue
(
);
fileio
.
unlinkSync
(
fpath
);
done
();
})
})
...
...
@@ -172,7 +172,7 @@ describe('securitylabel', function () {
securityLabel
.
setSecurityLabel
(
fpath
,
'
s1
'
,
async
function
(
err
)
{
let
dataLevel
=
await
securityLabel
.
getSecurityLabel
(
fpath
);
expect
(
dataLevel
==
'
s1
'
).
assertTrue
();
expect
(
fileio
.
unlinkSync
(
fpath
)
==
null
).
assertTrue
(
);
fileio
.
unlinkSync
(
fpath
);
done
();
})
}
catch
(
e
)
{
...
...
@@ -198,7 +198,7 @@ describe('securitylabel', function () {
await
securityLabel
.
setSecurityLabel
(
fpath
,
'
s2
'
);
securityLabel
.
getSecurityLabel
(
fpath
,
function
(
err
,
dataLevel
)
{
expect
(
dataLevel
==
'
s2
'
).
assertTrue
();
expect
(
fileio
.
unlinkSync
(
fpath
)
==
null
).
assertTrue
(
);
fileio
.
unlinkSync
(
fpath
);
done
();
})
}
catch
(
e
)
{
...
...
@@ -224,7 +224,7 @@ describe('securitylabel', function () {
await
securityLabel
.
setSecurityLabel
(
fpath
,
'
s3
'
);
let
dataLevel
=
await
securityLabel
.
getSecurityLabel
(
fpath
);
expect
(
dataLevel
==
'
s3
'
).
assertTrue
();
expect
(
fileio
.
unlinkSync
(
fpath
)
==
null
).
assertTrue
(
);
fileio
.
unlinkSync
(
fpath
);
done
();
}
catch
(
e
)
{
console
.
log
(
'
securitylabel_test_set_security_label_async_003 has failed for
'
+
e
);
...
...
@@ -249,7 +249,7 @@ describe('securitylabel', function () {
await
securityLabel
.
setSecurityLabel
(
fpath
,
'
s4
'
);
let
dataLevel
=
await
securityLabel
.
getSecurityLabel
(
fpath
);
expect
(
dataLevel
==
'
s4
'
).
assertTrue
();
expect
(
fileio
.
unlinkSync
(
fpath
)
==
null
).
assertTrue
(
);
fileio
.
unlinkSync
(
fpath
)
);
done
();
}
catch
(
e
)
{
console
.
log
(
'
securitylabel_test_set_security_label_async_004 has failed for
'
+
e
);
...
...
@@ -375,7 +375,7 @@ describe('securitylabel', function () {
await
securityLabel
.
setSecurityLabel
(
fpath
);
}
catch
(
err
)
{
console
.
log
(
'
securitylabel_test_set_security_label_async_010 has failed for
'
+
err
);
expect
(
fileio
.
unlinkSync
(
fpath
)
==
null
).
assertTrue
(
);
fileio
.
unlinkSync
(
fpath
);
expect
(
err
.
message
==
"
Number of arguments unmatched
"
).
assertTrue
();
done
();
}
...
...
@@ -400,7 +400,7 @@ describe('securitylabel', function () {
})
}
catch
(
err
)
{
console
.
log
(
'
securitylabel_test_set_security_label_async_011 has failed for
'
+
err
);
expect
(
fileio
.
unlinkSync
(
fpath
)
==
null
).
assertTrue
(
);
fileio
.
unlinkSync
(
fpath
);
expect
(
err
.
message
==
"
Number of arguments unmatched
"
).
assertTrue
();
done
();
}
...
...
@@ -558,7 +558,7 @@ describe('securitylabel', function () {
});
}
catch
(
err
)
{
console
.
log
(
'
securitylabel_test_get_security_label_async_003 has failed for
'
+
err
);
expect
(
fileio
.
unlinkSync
(
fpath
)
==
null
).
assertTrue
(
);
fileio
.
unlinkSync
(
fpath
);
expect
(
err
.
message
==
"
Number of arguments unmatched
"
).
assertTrue
();
done
();
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录