@@ -89,6 +89,7 @@ class Tester {
8989 // A convenient list of normalised service descriptor option names
9090 // i.e. 'arg.volumes' becomes 'volumes' (also contains expanded ranges)
9191 def optionNames = []
92+ def optionMinValues = []
9293 def optionDefaults = [:]
9394 // Files created by the entire test collection.
9495 // Defined in the 'setup_collection.creates' block.
@@ -466,6 +467,7 @@ class Tester {
466467 // (to avoid contamination from a prior test)
467468 optionNames. clear()
468469 optionDefaults. clear()
470+ optionMinValues. clear()
469471
470472 currentServiceDescriptor. serviceConfig. optionDescriptors. each { option ->
471473
@@ -478,6 +480,11 @@ class Tester {
478480 optionNames. add(arglessOption)
479481 }
480482
483+ // Collect the optional minValues value
484+ if (option. minValues != null ) {
485+ optionMinValues. add(option. minValues)
486+ }
487+
481488 // Collect the optional default value?
482489 if (option. defaultValue != null ) {
483490 if (option. defaultValue in java.util.List ) {
@@ -536,7 +543,7 @@ class Tester {
536543
537544 if (checkStatus) {
538545 // Now check that the user has not missed an option.
539- optionNames. each { option ->
546+ optionNames. each { String option ->
540547 boolean foundParam = false
541548 params. each { param ->
542549 // Accommodate range parameters
@@ -555,7 +562,7 @@ class Tester {
555562 }
556563 }
557564 }
558- if (! foundParam) {
565+ if (! foundParam && optionMinValues . size() > 0 && optionMinValues[ 0 ] > 0 ) {
559566 Log . err(" Pipeline option '$option ' is not defined in the test's params" +
560567 " and there is no default value to use." )
561568 checkStatus = false
0 commit comments