From 3eb6efad5f5bd6fc79f6af1d985517a7452a5098 Mon Sep 17 00:00:00 2001 From: Paolo Di Tommaso Date: Sun, 2 Feb 2025 15:25:10 +0100 Subject: [PATCH] Ignore tests when smoke mode is enabled [ci fast] Signed-off-by: Paolo Di Tommaso --- .../src/test/nextflow/file/http/HttpFilesTests.groovy | 11 ++++------- .../nextflow/file/http/XFileSystemProviderTest.groovy | 6 ++++-- .../batch/GoogleBatchMachineTypeSelectorTest.groovy | 3 ++- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/nf-httpfs/src/test/nextflow/file/http/HttpFilesTests.groovy b/modules/nf-httpfs/src/test/nextflow/file/http/HttpFilesTests.groovy index 123c17ffc2..f6774a8b3f 100644 --- a/modules/nf-httpfs/src/test/nextflow/file/http/HttpFilesTests.groovy +++ b/modules/nf-httpfs/src/test/nextflow/file/http/HttpFilesTests.groovy @@ -100,6 +100,7 @@ class HttpFilesTests extends Specification { server?.stop(0) } + @IgnoreIf({System.getenv('NXF_SMOKE')}) def 'read a http file ' () { given: def uri = new URI('http://www.nextflow.io/index.html') @@ -116,6 +117,7 @@ class HttpFilesTests extends Specification { } + @IgnoreIf({System.getenv('NXF_SMOKE')}) def 'should check file properties' () { given: SysEnv.push([NXF_HTTPFS_MAX_ATTEMPTS: '1']) @@ -152,8 +154,8 @@ class HttpFilesTests extends Specification { lines[1] == 'Disallow: /' } + @IgnoreIf({System.getenv('NXF_SMOKE')}) def 'should read HTTPS file' () { - given: def uri = new URI('https://www.nextflow.io/index.html') when: @@ -166,11 +168,10 @@ class HttpFilesTests extends Specification { then: lines.size()>0 lines[0].startsWith('') - } + @IgnoreIf({System.getenv('NXF_SMOKE')}) def 'should copy a file' () { - given: def uri = new URI('https://www.nextflow.io/index.html') def source = Paths.get(uri) @@ -184,7 +185,6 @@ class HttpFilesTests extends Specification { cleanup: target?.parent?.deleteDir() - } @IgnoreIf({System.getenv('NXF_SMOKE')}) @@ -204,7 +204,6 @@ class HttpFilesTests extends Specification { } def 'should read with a newByteChannel' () { - given: def wireMock = new WireMockGroovy(18080) wireMock.stub { @@ -237,10 +236,8 @@ class HttpFilesTests extends Specification { then: buffer.toString() == path.text buffer.toString() == '01234567890123456789012345678901234567890123456789' - } - def 'should use basic auth' () { given: def RESP = 'Hello world' diff --git a/modules/nf-httpfs/src/test/nextflow/file/http/XFileSystemProviderTest.groovy b/modules/nf-httpfs/src/test/nextflow/file/http/XFileSystemProviderTest.groovy index d64f7bd9c4..6a9fa28f5e 100644 --- a/modules/nf-httpfs/src/test/nextflow/file/http/XFileSystemProviderTest.groovy +++ b/modules/nf-httpfs/src/test/nextflow/file/http/XFileSystemProviderTest.groovy @@ -22,6 +22,7 @@ import java.nio.file.Path import com.github.tomakehurst.wiremock.junit.WireMockRule import com.github.tomjankes.wiremock.WireMockGroovy import org.junit.Rule +import spock.lang.IgnoreIf import spock.lang.Specification import spock.lang.Unroll /** @@ -29,7 +30,7 @@ import spock.lang.Unroll */ class XFileSystemProviderTest extends Specification { - + @IgnoreIf({System.getenv('NXF_SMOKE')}) def "should return input stream"() { given: def fsp = new HttpFileSystemProvider() @@ -98,7 +99,7 @@ class XFileSystemProviderTest extends Specification { Locale.setDefault(Locale.Category.FORMAT, defLocale) } - + @IgnoreIf({System.getenv('NXF_SMOKE')}) def "should read file attributes from HttpPath"() { given: def fsp = new HttpFileSystemProvider() @@ -111,6 +112,7 @@ class XFileSystemProviderTest extends Specification { attrs.size() > 0 } + @IgnoreIf({System.getenv('NXF_SMOKE')}) def "should read file attributes from FtpPath"() { given: def fsp = new FtpFileSystemProvider() diff --git a/plugins/nf-google/src/test/nextflow/cloud/google/batch/GoogleBatchMachineTypeSelectorTest.groovy b/plugins/nf-google/src/test/nextflow/cloud/google/batch/GoogleBatchMachineTypeSelectorTest.groovy index fa91093496..c36e13e3b4 100644 --- a/plugins/nf-google/src/test/nextflow/cloud/google/batch/GoogleBatchMachineTypeSelectorTest.groovy +++ b/plugins/nf-google/src/test/nextflow/cloud/google/batch/GoogleBatchMachineTypeSelectorTest.groovy @@ -1,8 +1,8 @@ package nextflow.cloud.google.batch import nextflow.cloud.google.batch.GoogleBatchMachineTypeSelector.MachineType -import nextflow.cloud.types.PriceModel import nextflow.util.MemoryUnit +import spock.lang.IgnoreIf import spock.lang.Specification class GoogleBatchMachineTypeSelectorTest extends Specification { @@ -63,6 +63,7 @@ class GoogleBatchMachineTypeSelectorTest extends Specification { } + @IgnoreIf({System.getenv('NXF_SMOKE')}) def 'should parse Seqera cloud info API'() { when: GoogleBatchMachineTypeSelector.INSTANCE.getAvailableMachineTypes("europe-west2", true)