Skip to content
Permalink
Browse files

MAINT: Split unrelated setup() and teardown() operations

  • Loading branch information
pan14001 committed Jun 23, 2017
1 parent dcefe7b commit fd1d9ef8771f6769f3d6d16e3f7e46f1fccd25a4
Showing with 4 additions and 10 deletions.
  1. +4 −10 tests/slurm.bats
@@ -2,17 +2,9 @@

source $BATS_TEST_DIRNAME/../dietslurm

setup() {
SLURM_JOB_ID=123
SLURM_JOB_NODELIST=login[1-3]
}

teardown() {
unset SLURM_JOB_ID SLURM_JOB_NODELIST
}

@test "SLURM job is detected" {
local magic_job_string
local SLURM_JOB_ID magic_job_string
SLURM_JOB_ID=123
magic_job_string="SLURM job"
run error_if_not_slurm_job
[[ $status = 0 ]]
@@ -24,6 +16,8 @@ teardown() {
}

@test "SLURM IP addresses are returned one per line" {
local SLURM_JOB_NODELIST
SLURM_JOB_NODELIST=login[1-3]
run slurm_ips
nlines=$(nodeset -c ${SLURM_JOB_NODELIST})
[[ $status = 0 ]]

0 comments on commit fd1d9ef

Please sign in to comment.
You can’t perform that action at this time.