File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed
main/nextflow/nomad/config Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 97
97
useJUnitPlatform()
98
98
jvmArgs ' --add-opens=java.base/java.lang=ALL-UNNAMED'
99
99
environment ' NOMAD_ADDR' , ' http://test-nf-nomad'
100
+ environment ' NOMAD_DC' , ' dc-test'
100
101
}
101
102
102
103
jar {
Original file line number Diff line number Diff line change @@ -53,7 +53,9 @@ class NomadJobOpts{
53
53
nomadJobOpts. datacenters : nomadJobOpts. datacenters. toString(). split(" ," ))
54
54
as List<String > ). findAll{it. size()}. unique()
55
55
}else {
56
- datacenters = (sysEnv. get(' NOMAD_DC' )?: " " ). split(" ," ) as List<String >
56
+ if ( sysEnv. containsKey(' NOMAD_DC' )) {
57
+ datacenters = sysEnv. get(' NOMAD_DC' ). split(" ," ) as List<String >
58
+ }
57
59
}
58
60
59
61
region = nomadJobOpts. region ?: sysEnv. get(' NOMAD_REGION' )
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ class NomadConfigSpec extends Specification {
90
90
])
91
91
92
92
expect :
93
- config. jobOpts. datacenters
93
+ config. jobOpts. datacenters == List . of( ' dc-test ' )
94
94
}
95
95
96
96
void " should use datacenters #dc with size #size if provided" () {
You can’t perform that action at this time.
0 commit comments