#!./common/bats/bin/bats
# -*-sh-*-

load ./common/test_helper_functions || exit 1
source ./common/functions || exit 1

if [ -s ./common/TEST_ENV ];then
    source ./common/TEST_ENV
fi

check_rms
rpm=slurm${DELIM}

@test "[$RESOURCE_MANAGER] Verify SLURM RPM version matches sinfo binary" {
    # check version against rpm
    local version="$(rpm -q --queryformat='%{VERSION}\n' $rpm)"

    run which sinfo
    assert_success

    sinfo --version | awk '{print $2}' >& .version_binary

    run grep "^${version}" .version_binary
    assert_success

    rm -f .version_binary

}

