Skip to content

Commit 9c1b411

Browse files
author
Alan Christie
committed
- Bugfix PipelineTester
collectionCreates getting corrupted
1 parent 5fb2d48 commit 9c1b411

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/groovy/PipelineTester.groovy

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class Tester {
8484
String currentTestFilename = ''
8585
// A convenient list of normalised service descriptor option names
8686
// i.e. 'arg.volumes' becomes 'volumes' (also contains expanded ranges)
87-
List<String> optionNames = []
87+
def optionNames = []
8888
def optionDefaults = [:]
8989
// Files created by the entire test collection.
9090
// Defined in the 'setup_collection.creates' block.
@@ -110,7 +110,7 @@ class Tester {
110110
// along with other test-specific objects
111111
currentTestFilename = path.split(File.separator)[-1]
112112
currentTestFilename = currentTestFilename.
113-
take(currentTestFilename.length() - testExt.length())
113+
take(currentTestFilename.length() - testExt.length())
114114
sectionNumber = 0
115115
testScriptVersion = 0
116116
testTimeoutSeconds = 30
@@ -618,7 +618,7 @@ class Tester {
618618
// Now swap-out the original '-o'...
619619
String redirectedOutputOption = "-o ${testOutputFile.toString()}"
620620
pipelineCommand = pipelineCommand.replaceAll(/$outputRegex/,
621-
redirectedOutputOption)
621+
redirectedOutputOption)
622622

623623
}
624624

@@ -632,8 +632,8 @@ class Tester {
632632
//
633633
int executeAnchorDirPos = filename.indexOf(executeAnchorDir)
634634
File testExecutionDir =
635-
new File(filename.take(filename.indexOf(File.separator,
636-
executeAnchorDirPos + executeAnchorDir.length())))
635+
new File(filename.take(filename.indexOf(File.separator,
636+
executeAnchorDirPos + executeAnchorDir.length())))
637637
info("Dir : $testExecutionDir")
638638
// And the expanded and redirected command...
639639
info("Cmd : $pipelineCommand")
@@ -660,7 +660,7 @@ class Tester {
660660
boolean validated = true
661661
if (exitValue == 0) {
662662

663-
List<String> testCreates = collectionCreates
663+
def testCreates = collectionCreates.collect()
664664
if (createsBlock != null) {
665665
testCreates.addAll(createsBlock)
666666
}

0 commit comments

Comments
 (0)