Skip to content

Commit 0ee1cd6

Browse files
authored
Merge pull request #842 from intersystems/csp-deploy-improvements
Clarify error message when importing web app files
2 parents 093ec2e + cfe18c3 commit 0ee1cd6

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

cls/SourceControl/Git/Utils.cls

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1469,7 +1469,7 @@ ClassMethod ImportCSPFile(InternalName As %String) As %Status
14691469
}
14701470
// Delete original if exists, otherwise create new file
14711471
if '(##class(%File).CopyFile(srcFile, cspFile, 1, .ret)) {
1472-
set sc = $$$ERROR($$$GeneralError,"Unable to copy CSP file from "_srcFile_" to "_cspFile_": return code "_ret)
1472+
set sc = $$$ERROR($$$GeneralError,"Unable to copy web application file from "_srcFile_" to "_cspFile_": return code "_ret)
14731473
}
14741474

14751475
Quit sc
@@ -3297,3 +3297,4 @@ ClassMethod IsSchemaStandard(pName As %String = "") As %Boolean [ Internal ]
32973297
}
32983298

32993299
}
3300+

test/UnitTest/SourceControl/Git/ImportAll.cls

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
Class UnitTest.SourceControl.Git.ImportAll Extends UnitTest.SourceControl.Git.AbstractTest
22
{
33

4+
Parameter WebAppName As STRING = "/csp/git/unittest/xsl";
5+
46
Property WebAppPath As %String;
57

68
Method %OnNew(initvalue) As %Status
@@ -10,11 +12,11 @@ Method %OnNew(initvalue) As %Status
1012
/// add mappings for MAC and CSP
1113
Set settings = ##class(SourceControl.Git.Settings).%New()
1214
Set settings.Mappings("MAC","*")="rtn/"
13-
Set settings.Mappings("/CSP/","/csp/git/unittest/xsl")="csp/git/unittest/xsl"
15+
Set settings.Mappings("/CSP/",..#WebAppName)="csp/git/unittest/xsl"
1416
$$$ThrowOnError(settings.%Save())
1517
set ..WebAppPath = ##class(%File).TempFilename()_"d"
1618
do ##class(%File).CreateDirectoryChain(..WebAppPath)
17-
do ..CreateTestWebApp("/csp/git/unittest/xsl", ..WebAppPath)
19+
do ..CreateTestWebApp(..#WebAppName, ..WebAppPath)
1820
return $$$OK
1921
}
2022

@@ -43,7 +45,7 @@ ClassMethod DeleteTestWebApp(name)
4345

4446
Method %OnClose() As %Status [ Private, ServerOnly = 1 ]
4547
{
46-
do ..DeleteTestWebApp("/csp/git/unittest/xsl")
48+
do ..DeleteTestWebApp(..#WebAppName)
4749
do ##class(%File).RemoveDirectoryTree(..WebAppPath)
4850
quit ##super()
4951
}

0 commit comments

Comments
 (0)