提交 27258a30 编写于 作者: H huangke11

add cust js api test

Signed-off-by: Nhuangke11 <huangke11@huawei.com>
上级 d0d76c99
......@@ -17,12 +17,12 @@
{
"type": "ShellKit",
"run-command": [
"mkdir -p /system/etc/custxml/",
"mkdir -p /sys-prod/etc/custxml/",
"touch /system/etc/custxml/system.xml",
"touch /system/etc/custxml/both.xml",
"touch /sys-prod/etc/custxml/both.xml",
"touch /sys-prod/etc/custxml/user.xml"
"mkdir -p /system/etc/custxmltest/",
"mkdir -p /sys-prod/etc/custxmltest/",
"touch /system/etc/custxmltest/system.xml",
"touch /system/etc/custxmltest/both.xml",
"touch /sys-prod/etc/custxmltest/both.xml",
"touch /sys-prod/etc/custxmltest/user.xml"
]
}
]
......
......@@ -25,19 +25,19 @@ describe('GetCfgFilesTest', function () {
* @tc.desc get getCfgFiles in callback mode
*/
it('getCfgFiles_test_003', 0, async function (done) {
cust.getCfgFiles('custxml/none.xml', (error, value) => {
cust.getCfgFiles('custxmltest/none.xml', (error, value) => {
expect(value.length == 0).assertTrue();
console.log('CustTest getCfgFiles_test_003, none.xml:' + value);
});
cust.getCfgFiles('custxml/system.xml', (error, value) => {
cust.getCfgFiles('custxmltest/system.xml', (error, value) => {
expect(value.length != 0).assertTrue();
console.log('CustTest getCfgFiles_test_003, system.xml:' + value);
});
cust.getCfgFiles('custxml/both.xml', (error, value) => {
cust.getCfgFiles('custxmltest/both.xml', (error, value) => {
expect(value.length != 0).assertTrue();
console.log('CustTest getCfgFiles_test_003, both.xml:' + value);
});
cust.getCfgFiles('custxml/user.xml', (error, value) => {
cust.getCfgFiles('custxmltest/user.xml', (error, value) => {
expect(value.length != 0).assertTrue();
console.log('CustTest getCfgFiles_test_003, user.xml:' + value);
});
......@@ -50,19 +50,19 @@ describe('GetCfgFilesTest', function () {
* @tc.desc get getCfgFiles in promise mode
*/
it('getCfgFiles_test_004', 0, async function (done) {
cust.getCfgFiles('custxml/none.xml').then(value => {
cust.getCfgFiles('custxmltest/none.xml').then(value => {
expect(value.length == 0).assertTrue();
console.log('CustTest getCfgFiles_test_004, none.xml:' + value);
});
cust.getCfgFiles('custxml/system.xml').then(value => {
cust.getCfgFiles('custxmltest/system.xml').then(value => {
expect(value.length != 0).assertTrue();
console.log('CustTest getCfgFiles_test_004, system.xml:' + value);
});
cust.getCfgFiles('custxml/both.xml').then(value => {
cust.getCfgFiles('custxmltest/both.xml').then(value => {
expect(value.length != 0).assertTrue();
console.log('CustTest getCfgFiles_test_004, both.xml:' + value);
});
cust.getCfgFiles('custxml/user.xml').then(value => {
cust.getCfgFiles('custxmltest/user.xml').then(value => {
expect(value.length != 0).assertTrue();
console.log('CustTest getCfgFiles_test_004, user.xml:' + value);
});
......
......@@ -25,19 +25,19 @@ describe('GetOneCfgFileTest', function () {
* @tc.desc get getOneCfgFile in callback mode
*/
it('getOneCfgFile_test_001', 0, async function (done) {
cust.getOneCfgFile('custxml/none.xml', (error, value) => {
cust.getOneCfgFile('custxmltest/none.xml', (error, value) => {
expect(value.length == 0).assertTrue();
console.log('CustTest getOneCfgFile_test_001, none.xml:' + value);
});
cust.getOneCfgFile('custxml/system.xml', (error, value) => {
cust.getOneCfgFile('custxmltest/system.xml', (error, value) => {
expect(value.length != 0).assertTrue();
console.log('CustTest getOneCfgFile_test_001, system.xml:' + value);
});
cust.getOneCfgFile('custxml/both.xml', (error, value) => {
cust.getOneCfgFile('custxmltest/both.xml', (error, value) => {
expect(value.length != 0).assertTrue();
console.log('CustTest getOneCfgFile_test_001, both.xml:' + value);
});
cust.getOneCfgFile('custxml/user.xml', (error, value) => {
cust.getOneCfgFile('custxmltest/user.xml', (error, value) => {
expect(value.length != 0).assertTrue();
console.log('CustTest getOneCfgFile_test_001, user.xml:' + value);
});
......@@ -50,19 +50,19 @@ describe('GetOneCfgFileTest', function () {
* @tc.desc get getOneCfgFile in promise mode
*/
it('getOneCfgFile_test_002', 0, async function (done) {
cust.getOneCfgFile('custxml/none.xml').then(value => {
cust.getOneCfgFile('custxmltest/none.xml').then(value => {
expect(value.length == 0).assertTrue();
console.log('CustTest getOneCfgFile_test_002, none.xml:' + value);
});
cust.getOneCfgFile('custxml/system.xml').then(value => {
cust.getOneCfgFile('custxmltest/system.xml').then(value => {
expect(value.length != 0).assertTrue();
console.log('CustTest getOneCfgFile_test_002, system.xml:' + value);
});
cust.getOneCfgFile('custxml/both.xml').then(value => {
cust.getOneCfgFile('custxmltest/both.xml').then(value => {
expect(value.length != 0).assertTrue();
console.log('CustTest getOneCfgFile_test_002, both.xml:' + value);
});
cust.getOneCfgFile('custxml/user.xml').then(value => {
cust.getOneCfgFile('custxmltest/user.xml').then(value => {
expect(value.length != 0).assertTrue();
console.log('CustTest getOneCfgFile_test_002, user.xml:' + value);
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册