From ad40b12e36744c9cd9a484f3fe3e9a258f8da46a Mon Sep 17 00:00:00 2001
From: Moe Jette <jette1@llnl.gov>
Date: Fri, 3 Apr 2009 19:12:19 +0000
Subject: [PATCH] Add check for SlurmUser or root right at the top

---
 testsuite/expect/test3.5 | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/testsuite/expect/test3.5 b/testsuite/expect/test3.5
index b7a89175973..6e72334e079 100755
--- a/testsuite/expect/test3.5
+++ b/testsuite/expect/test3.5
@@ -39,6 +39,11 @@ set part_name      "QA_TEST"
 
 print_header $test_id
 
+if {[test_super_user] == 0} {
+	send_user "\nWARNING: can not test more unless SlurmUser or root\n"
+	exit $exit_code
+}
+
 #
 # Confirm the partition name does not already exist
 #
@@ -110,11 +115,6 @@ if {[string compare $def_node ""] == 0} {
 #
 spawn $scontrol create PartitionName=$part_name Nodes=$def_node
 expect {
-	-re "Error creating the partition: Invalid user" {
-		send_user "\nWARNING: user not authorized to create partition\n"
-		exit $exit_code
-		exp_continue
-	}
 	-re "error" {
 		send_user "\nFAILURE: something bad happened on partitiion create\n"
 		set exit_code 1
-- 
GitLab