From 9e1e474f6a9de853b5547808ebbaa3b3dbd013a4 Mon Sep 17 00:00:00 2001 From: kkoon Date: Wed, 23 Feb 2022 15:22:30 +0800 Subject: [PATCH] update test case judgment Signed-off-by: kkoon --- .../src/main/js/default/test/VolumeManager.test.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/storage/storagevolumesjstest/src/main/js/default/test/VolumeManager.test.js b/storage/storagevolumesjstest/src/main/js/default/test/VolumeManager.test.js index 4297786d5..28833ce9f 100644 --- a/storage/storagevolumesjstest/src/main/js/default/test/VolumeManager.test.js +++ b/storage/storagevolumesjstest/src/main/js/default/test/VolumeManager.test.js @@ -148,10 +148,15 @@ describe("volumeManager", function () { */ it("volume_manager_test_get_all_Volumes_async_004", 0, async function (done) { try { + + await volumeManager.getAllVolumes(false); expect(null).assertFail(); } 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(); } done(); @@ -245,7 +250,7 @@ describe("volumeManager", function () { expect(null).assertFail(); } catch (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(); }); @@ -398,7 +403,7 @@ describe("volumeManager", function () { expect(null).assertFail(); } catch (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(); }); -- GitLab