-
Notifications
You must be signed in to change notification settings - Fork 636
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Ben Sherman <[email protected]> Signed-off-by: Paolo Di Tommaso <[email protected]> Co-authored-by: Paolo Di Tommaso <[email protected]>
- Loading branch information
1 parent
d1bbd3d
commit fa0e8e0
Showing
7 changed files
with
79 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,8 +16,6 @@ | |
|
||
package nextflow.config | ||
|
||
import spock.lang.Ignore | ||
|
||
import java.nio.file.Files | ||
import java.nio.file.NoSuchFileException | ||
import java.nio.file.Path | ||
|
@@ -26,18 +24,36 @@ import com.sun.net.httpserver.Headers | |
import com.sun.net.httpserver.HttpExchange | ||
import com.sun.net.httpserver.HttpHandler | ||
import com.sun.net.httpserver.HttpServer | ||
import nextflow.SysEnv | ||
import nextflow.exception.ConfigParseException | ||
import spock.lang.Specification | ||
|
||
import nextflow.util.Duration | ||
import nextflow.util.MemoryUnit | ||
import spock.lang.Ignore | ||
import spock.lang.Specification | ||
|
||
/** | ||
* | ||
* @author Paolo Di Tommaso <[email protected]> | ||
*/ | ||
class ConfigParserTest extends Specification { | ||
|
||
def 'should get an environment variable' () { | ||
given: | ||
SysEnv.push(MAX_CPUS: '1') | ||
|
||
when: | ||
def CONFIG = ''' | ||
process.cpus = env('MAX_CPUS') | ||
''' | ||
def config = new ConfigParser().parse(CONFIG) | ||
|
||
then: | ||
config.process.cpus == '1' | ||
|
||
cleanup: | ||
SysEnv.pop() | ||
} | ||
|
||
def 'should parse plugins id' () { | ||
given: | ||
def CONFIG = ''' | ||
|