diff --git a/testsuite/expect/test31.1 b/testsuite/expect/test31.1
index cc96c799baa12ede025506bc6298409146bf38e0..114538a08f364ef9cbf201ab0f65dee9f3c656ea 100755
--- a/testsuite/expect/test31.1
+++ b/testsuite/expect/test31.1
@@ -152,7 +152,7 @@ proc check_proc {program_name} {
 
 proc run_job { file_type program_name conf_change task_pro} {
 
-	global srun run_host make_file exit_code bin_rm bin_printenv bin_sleep cwd
+	global srun run_host make_file exit_code bin_rm bin_printenv bin_sleep cwd test_id
 
 	# Change the included file to epilog in the slurm.conf
 	change_pro_epi $file_type $program_name $conf_change $task_pro