Skip to content

Commit

Permalink
Remove unnecessary Fusion env var [ci fast]
Browse files Browse the repository at this point in the history
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
  • Loading branch information
pditommaso committed Jan 13, 2023
1 parent 646776a commit dfa4755
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 8 deletions.
Expand Up @@ -93,11 +93,9 @@ class FusionScriptLauncher extends BashWrapperBuilder {

Map<String,String> fusionEnv() {
if( env==null ) {
final buckets = fusionBuckets().collect(it->"$scheme://$it").join(',')
final work = toContainerMount(remoteWorkDir).toString()
final result = new LinkedHashMap(10)
result.NXF_FUSION_WORK = work
result.NXF_FUSION_BUCKETS = buckets
// foreign env
final provider = new FusionEnvProvider()
result.putAll(provider.getEnvironment(scheme))
Expand Down
Expand Up @@ -67,8 +67,7 @@ class FusionScriptLauncherTest extends Specification {
remoteWorkDir: XPath.get('http://foo/work'))

expect:
fusion.fusionEnv() == [NXF_FUSION_BUCKETS: 'http://foo',
NXF_FUSION_WORK: '/fusion/http/foo/work']
fusion.fusionEnv() == [NXF_FUSION_WORK: '/fusion/http/foo/work']
}

def 'should get header script' () {
Expand Down
Expand Up @@ -73,7 +73,7 @@ class LocalTaskHandlerTest extends Specification {
then:
handler.fusionEnabled() >> true
and:
builder.command() == ['sh','-c','docker run -i -e "NXF_FUSION_WORK=/fusion/http/some/work/dir" -e "NXF_FUSION_BUCKETS=http://some" --rm --privileged ubuntu:latest bash -o pipefail -c \'trap "{ ret=$?; cp .command.log /fusion/http/some/work/dir/.command.log||true; exit $ret; }" EXIT; bash /fusion/http/some/work/dir/.command.run 2>&1 | tee .command.log\'']
builder.command() == ['sh','-c','docker run -i -e "NXF_FUSION_WORK=/fusion/http/some/work/dir" --rm --privileged ubuntu:latest bash -o pipefail -c \'trap "{ ret=$?; cp .command.log /fusion/http/some/work/dir/.command.log||true; exit $ret; }" EXIT; bash /fusion/http/some/work/dir/.command.run 2>&1 | tee .command.log\'']
builder.directory() == null
builder.redirectErrorStream()
builder.redirectOutput().file()
Expand Down
Expand Up @@ -59,7 +59,6 @@ class FusionScriptLauncherS3Test extends Specification {

expect:
fusion.fusionEnv() == [AWS_S3_ENDPOINT: 'http://foo.com',
NXF_FUSION_BUCKETS: 's3://foo',
NXF_FUSION_WORK: '/fusion/s3/foo/work']

cleanup:
Expand All @@ -80,7 +79,6 @@ class FusionScriptLauncherS3Test extends Specification {
expect:
fusion.fusionEnv() == [AWS_ACCESS_KEY_ID: 'xxx',
AWS_SECRET_ACCESS_KEY: 'zzz',
NXF_FUSION_BUCKETS: 's3://foo',
NXF_FUSION_WORK: '/fusion/s3/foo/work']

cleanup:
Expand All @@ -104,7 +102,6 @@ class FusionScriptLauncherS3Test extends Specification {
fusion.fusionEnv() == [AWS_ACCESS_KEY_ID: 'k1',
AWS_SECRET_ACCESS_KEY: 's1',
AWS_S3_ENDPOINT: 'http://minio.com',
NXF_FUSION_BUCKETS: 's3://foo',
NXF_FUSION_WORK: '/fusion/s3/foo/work']

cleanup:
Expand Down

0 comments on commit dfa4755

Please sign in to comment.