Skip to content

Commit ed20380

Browse files
author
Alan Christie
committed
- Early support for 'creates' section
1 parent 47da790 commit ed20380

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

src/groovy/PipelineTester.groovy

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -644,11 +644,19 @@ class Tester {
644644
if (testOutputPath != null && createsBlock != null) {
645645
def outputFiles = new FileNameFinder().
646646
getFileNames(testOutputPath.toString(), "*")
647-
println "++++++ " + outputFiles
648-
println "++++++ " + createsBlock
649-
if (outputFiles.size() == 0) {
650-
err("Expected output files '$testOutputFile' but got nothing")
651-
validated = false
647+
for (String create in creates) {
648+
boolean found = false
649+
for (String outputFile in outputFiles) {
650+
if (outputFile.endsWith(create)) {
651+
found = true
652+
break
653+
}
654+
}
655+
if (!found) {
656+
err("Expected output file '$creste' but couldn't find it")
657+
validated = false
658+
break
659+
}
652660
}
653661
}
654662

0 commit comments

Comments
 (0)