@@ -680,6 +680,8 @@ Method TestDependencyVersionsUpdated()
680680 set modBPreVersion = " 1.0.0"
681681 set modCPreVersion = " 5.6.45+snapshot"
682682
683+ set modAErrorVersion = " 2.0.5+snapshot"
684+
683685 set modAPostVersion = " 2.1.0+snapshot"
684686 set modBPostVersion = " 2.0.0+snapshot"
685687 set modCPostVersion = " 6.2.0+snapshot"
@@ -695,6 +697,7 @@ Method TestDependencyVersionsUpdated()
695697 do $$$AssertEquals(mod .Version .ToString (), modBPreVersion , " Module " _ modB _ " correctly installed as " _ modBPreVersion )
696698 set mod = ##class (%IPM.Storage.Module ).NameOpen (modC )
697699 do $$$AssertEquals(mod .Version .ToString (), modCPreVersion , " Module " _ modC _ " correctly installed as " _ modCPreVersion )
700+ kill mod
698701
699702 // Install module-d prior to update
700703 set sc = ##class (%IPM.Main ).Shell (" install -v " _ modD )
@@ -704,9 +707,15 @@ Method TestDependencyVersionsUpdated()
704707 set sc = ##class (%IPM.Main ).Shell (" update -v " _ modA _ " " _ modAPostVersion )
705708 do $$$AssertStatusNotOK(sc , " Updating " _ modA _ " fails due to version errors with previously installed " _ modD )
706709
707- // Uninstall module-d then try the update again
710+ // Uninstall module-d since we don't need it anymore
708711 set sc = ##class (%IPM.Main ).Shell (" uninstall -v " _ modD )
709712 do $$$AssertStatusOK(sc , " Successfully uninstalled " _ modD )
713+
714+ // Try updating module-a to a version that will fail with same resource as in module-c
715+ set sc = ##class (%IPM.Main ).Shell (" update -v " _ modA _ " " _ modAErrorVersion )
716+ do $$$AssertStatusNotOK(sc , " Updating " _ modA _ " to version " _ modAErrorVersion _ " fails due to same resource in modules a and c" )
717+
718+ // Not do an update that should succeed
710719 set sc = ##class (%IPM.Main ).Shell (" update -v " _ modA _ " " _ modAPostVersion )
711720 do $$$AssertStatusOK(sc , " Successfully updated " _ modA _ " and its dependencies" )
712721
0 commit comments