提交 9e1e474f 编写于 作者: K kkoon

update test case judgment

Signed-off-by: Nkkoon <kongzheng6@huawei.com>
上级 4452db14
...@@ -148,10 +148,15 @@ describe("volumeManager", function () { ...@@ -148,10 +148,15 @@ describe("volumeManager", function () {
*/ */
it("volume_manager_test_get_all_Volumes_async_004", 0, async function (done) { it("volume_manager_test_get_all_Volumes_async_004", 0, async function (done) {
try { try {
await volumeManager.getAllVolumes(false); await volumeManager.getAllVolumes(false);
expect(null).assertFail(); expect(null).assertFail();
} catch (error) { } catch (error) {
console.log(`volume_manager_test_get_all_Volumes_async_004 has failed for error ${error}`);
console.log(`volume_manager_test_get_all_Volumes_async_004 has failed f
or error ${error}`);
expect(isInclude(error, "The callback shall be a funciton")).assertTrue(); expect(isInclude(error, "The callback shall be a funciton")).assertTrue();
} }
done(); done();
...@@ -245,7 +250,7 @@ describe("volumeManager", function () { ...@@ -245,7 +250,7 @@ describe("volumeManager", function () {
expect(null).assertFail(); expect(null).assertFail();
} catch (error) { } catch (error) {
console.log(`volume_manager_test_mount_async_003 has failed for ${error}`); console.log(`volume_manager_test_mount_async_003 has failed for ${error}`);
expect(isInclude(error, "not a function")).assertTrue(); expect(isInclude(error, "not a function") || isInclude(error, "is not callable")).assertTrue();
} }
done(); done();
}); });
...@@ -398,7 +403,7 @@ describe("volumeManager", function () { ...@@ -398,7 +403,7 @@ describe("volumeManager", function () {
expect(null).assertFail(); expect(null).assertFail();
} catch (error) { } catch (error) {
console.log(`volume_manager_test_unmount_async_004 has failed for ${error}`); console.log(`volume_manager_test_unmount_async_004 has failed for ${error}`);
expect(isInclude(error, "not a function")).assertTrue(); expect(isInclude(error, "not a function") || isInclude(error, "is not callable")).assertTrue();
} }
done(); done();
}); });
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册