提交 1f28ca70 编写于 作者: R raoxian

补全用例

Signed-off-by: Nraoxian <raoxian@huawei.com>
上级 81603fce
...@@ -227,6 +227,8 @@ describe('securitylabel', function () { ...@@ -227,6 +227,8 @@ describe('securitylabel', function () {
try { try {
let flag = await securitylabel.setSecurityLabel(fpath, ''); let flag = await securitylabel.setSecurityLabel(fpath, '');
expect(flag == false).assertTrue(); expect(flag == false).assertTrue();
let dataLevel = await securitylabel.getSecurityLabel(fpath);
expect(dataLevel == '').assertTrue();
expect(fileio.unlinkSync(fpath) == null).assertTrue(); expect(fileio.unlinkSync(fpath) == null).assertTrue();
done(); done();
} catch (e) { } catch (e) {
...@@ -252,6 +254,8 @@ describe('securitylabel', function () { ...@@ -252,6 +254,8 @@ describe('securitylabel', function () {
try { try {
let flag = await securitylabel.setSecurityLabel(fpath, 'ss'); let flag = await securitylabel.setSecurityLabel(fpath, 'ss');
expect(flag == false).assertTrue(); expect(flag == false).assertTrue();
let dataLevel = await securitylabel.getSecurityLabel(fpath);
expect(dataLevel == '').assertTrue();
expect(fileio.unlinkSync(fpath) == null).assertTrue(); expect(fileio.unlinkSync(fpath) == null).assertTrue();
done(); done();
} catch (e) { } catch (e) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册