Skip to content

Commit

Permalink
Fix failing tests
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 Mar 17, 2024
1 parent c4981dc commit 766f20c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@ jobs:

- name: Test
if: steps.changed-files.outputs.any_changed == 'true'
run: make test
run: |
# configure test env
echo $GOOGLE_SECRET | base64 -d > $PWD/google_credentials.json
export GOOGLE_APPLICATION_CREDENTIALS=$PWD/google_credentials.json
# run tests
make test
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,18 @@
package nextflow.cloud.google.batch.client

import nextflow.Session
import nextflow.SysEnv
import spock.lang.Requires
import spock.lang.Specification

/**
*
* @author Paolo Di Tommaso <paolo.ditommaso@gmail.com>
*/
class BatchConfigTest extends Specification {

@Requires({System.getenv('GOOGLE_APPLICATION_CREDENTIALS')})
def 'should create batch config' () {
given:
SysEnv.push([:])
and:
def CONFIG = [google: [
project:'proj-123',
batch: [
spot: true,
retryPolicy: [maxAttempts: 10]
Expand All @@ -43,14 +40,10 @@ class BatchConfigTest extends Specification {
when:
def config = BatchConfig.create(session)
then:
config.googleOpts.projectId == 'proj-123'
and:
config.getSpot()
and:
config.retryConfig.maxAttempts == 10

cleanup:
SysEnv.pop()
}

}

0 comments on commit 766f20c

Please sign in to comment.