Skip to content

Commit fc1d429

Browse files
committed
add tests [ci skip]
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
1 parent fae47bd commit fc1d429

1 file changed

Lines changed: 36 additions & 1 deletion

File tree

plugins/nf-seqera/src/test/io/seqera/config/ExecutorOptsTest.groovy

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ class ExecutorOptsTest extends Specification {
4141

4242
then:
4343
config.endpoint == 'https://sched.example.com'
44-
config.region == 'eu-central-1' // default
44+
config.region == null
45+
config.provider == null
4546
config.keyPairName == null
4647
config.batchFlushInterval == Duration.of('1 sec')
4748
config.machineRequirement != null
@@ -248,6 +249,40 @@ class ExecutorOptsTest extends Specification {
248249
config.computeEnvId == null
249250
}
250251

252+
def 'should create config with provider' () {
253+
when:
254+
def config = new ExecutorOpts([
255+
endpoint: 'https://sched.example.com',
256+
provider: 'aws'
257+
])
258+
259+
then:
260+
config.provider == 'aws'
261+
}
262+
263+
def 'should default provider to null' () {
264+
when:
265+
def config = new ExecutorOpts([
266+
endpoint: 'https://sched.example.com'
267+
])
268+
269+
then:
270+
config.provider == null
271+
}
272+
273+
def 'should create config with provider and region' () {
274+
when:
275+
def config = new ExecutorOpts([
276+
endpoint: 'https://sched.example.com',
277+
provider: 'aws',
278+
region: 'us-west-2'
279+
])
280+
281+
then:
282+
config.provider == 'aws'
283+
config.region == 'us-west-2'
284+
}
285+
251286
def 'should reject invalid prediction model' () {
252287
when:
253288
new ExecutorOpts([

0 commit comments

Comments
 (0)