Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -718,8 +718,6 @@ class ConfigBuilder {
config.tower.enabled = true
if( cmdRun.withTower != '-' )
config.tower.endpoint = cmdRun.withTower
else if( !config.tower.endpoint )
config.tower.endpoint = 'https://api.cloud.seqera.io'
}

// -- set wave options
Expand All @@ -729,8 +727,6 @@ class ConfigBuilder {
config.wave.enabled = true
if( cmdRun.withWave != '-' )
config.wave.endpoint = cmdRun.withWave
else if( !config.wave.endpoint )
config.wave.endpoint = 'https://wave.seqera.io'
}

// -- set fusion options
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,7 @@ class ConfigBuilderTest extends Specification {
then: // command line should override the config file
config.trace instanceof Map
config.trace.enabled
!config.trace.file
}

def 'should set session report options' () {
Expand Down Expand Up @@ -909,6 +910,7 @@ class ConfigBuilderTest extends Specification {
then:
config.report instanceof Map
config.report.enabled
!config.report.file
}


Expand Down Expand Up @@ -965,6 +967,7 @@ class ConfigBuilderTest extends Specification {
then:
config.dag instanceof Map
config.dag.enabled
!config.dag.file
}

def 'should set session weblog options' () {
Expand Down Expand Up @@ -1083,6 +1086,7 @@ class ConfigBuilderTest extends Specification {
then:
config.timeline instanceof Map
config.timeline.enabled
!config.timeline.file
}

def 'should set tower options' () {
Expand Down Expand Up @@ -1129,7 +1133,7 @@ class ConfigBuilderTest extends Specification {
then:
config.tower instanceof Map
config.tower.enabled
config.tower.endpoint == 'https://api.cloud.seqera.io'
!config.tower.endpoint
}

def 'should set wave options' () {
Expand Down Expand Up @@ -1176,7 +1180,7 @@ class ConfigBuilderTest extends Specification {
then:
config.wave instanceof Map
config.wave.enabled
config.wave.endpoint == 'https://wave.seqera.io'
!config.wave.endpoint
}

def 'should set cloudcache options' () {
Expand Down Expand Up @@ -2352,9 +2356,9 @@ class ConfigBuilderTest extends Specification {

def 'should return parsed config' () {
given:
def cmd = new CmdRun(profile: 'first', withTower: 'http://foo.com', launcher: new Launcher())
def base = Files.createTempDirectory('test')
base.resolve('nextflow.config').text = '''
def configFile = base.resolve('nextflow.config')
configFile.text = '''
profiles {
first {
params {
Expand All @@ -2371,6 +2375,8 @@ class ConfigBuilderTest extends Specification {
}
'''
when:
def opt = new CliOptions(config: [configFile.toFile().canonicalPath])
def cmd = new CmdRun(profile: 'first', withTower: 'http://foo.com', launcher: new Launcher(options: opt))
def txt = ConfigBuilder.resolveConfig(base, cmd)
then:
txt == '''\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@ import spock.lang.Specification
*/
class TowerConfigTest extends Specification {

def 'should use default endpoint when not specified'() {
when:
def config = new TowerConfig([:], [TOWER_API_ENDPOINT: 'https://example.com'])
then:
config.endpoint == 'https://example.com'

when:
config = new TowerConfig([:], [:])
then:
config.endpoint == 'https://api.cloud.seqera.io'
}

def 'should use default timeout values when not specified'() {
when:
def config = new TowerConfig([:], [:])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ import nextflow.util.Duration
@ToString(includeNames = true, includePackage = false, includeFields = true, useGetters = false)
@CompileStatic
class WaveConfig implements ConfigScope {

final private static String DEF_ENDPOINT = 'https://wave.seqera.io'

final private static List<String> DEF_STRATEGIES = List.of('container','dockerfile','conda')

final BuildOpts build
Expand Down
Loading