[ARVADOS] updated: 2.1.0-1030-g51afdd46e

Git user git at public.arvados.org
Mon Jul 5 14:10:48 UTC 2021


Summary of changes:
 lib/lsf/dispatch_test.go         | 15 +++++++++++++--
 sdk/go/health/aggregator_test.go |  1 +
 2 files changed, 14 insertions(+), 2 deletions(-)

       via  51afdd46ed4732d38496f80f7c07e05cfa15094e (commit)
       via  774d4659d60c017e9d3e0f68c5726abbe2465007 (commit)
      from  a58fb1d04bf2994de007e5347bd06d500ddbd68a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 51afdd46ed4732d38496f80f7c07e05cfa15094e
Author: Tom Clegg <tom at curii.com>
Date:   Mon Jul 5 10:10:11 2021 -0400

    17756: Fix tests to accommodate sudo and added bjobs args.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>

diff --git a/lib/lsf/dispatch_test.go b/lib/lsf/dispatch_test.go
index 25db95e10..7cf6df643 100644
--- a/lib/lsf/dispatch_test.go
+++ b/lib/lsf/dispatch_test.go
@@ -49,6 +49,7 @@ func (s *suite) SetUpTest(c *check.C) {
 }
 
 type lsfstub struct {
+	sudoUser  string
 	errorRate float64
 }
 
@@ -61,6 +62,13 @@ func (stub lsfstub) stubCommand(c *check.C) func(prog string, args ...string) *e
 		if rand.Float64() < stub.errorRate {
 			return exec.Command("bash", "-c", "echo >&2 'stub random failure' && false")
 		}
+		if stub.sudoUser != "" && len(args) > 3 &&
+			prog == "sudo" &&
+			args[0] == "-E" &&
+			args[1] == "-u" &&
+			args[2] == stub.sudoUser {
+			prog, args = args[3], args[4:]
+		}
 		switch prog {
 		case "bsub":
 			c.Assert(args, check.HasLen, 4)
@@ -84,7 +92,7 @@ func (stub lsfstub) stubCommand(c *check.C) func(prog string, args ...string) *e
 			}
 			return exec.Command("echo", "submitted job")
 		case "bjobs":
-			c.Check(args, check.DeepEquals, []string{"-noheader", "-o", "jobid stat job_name:30"})
+			c.Check(args, check.DeepEquals, []string{"-u", "all", "-noheader", "-o", "jobid stat job_name:30"})
 			out := ""
 			for jobid, uuid := range fakejobq {
 				out += fmt.Sprintf(`%d %s %s\n`, jobid, "RUN", uuid)
@@ -113,7 +121,10 @@ func (stub lsfstub) stubCommand(c *check.C) func(prog string, args ...string) *e
 }
 
 func (s *suite) TestSubmit(c *check.C) {
-	s.disp.lsfcli.stubCommand = lsfstub{errorRate: 0.1}.stubCommand(c)
+	s.disp.lsfcli.stubCommand = lsfstub{
+		errorRate: 0.1,
+		sudoUser:  s.disp.Cluster.Containers.LSF.BsubSudoUser,
+	}.stubCommand(c)
 	s.disp.Start()
 	deadline := time.Now().Add(20 * time.Second)
 	for range time.NewTicker(time.Second).C {

commit 774d4659d60c017e9d3e0f68c5726abbe2465007
Author: Tom Clegg <tom at curii.com>
Date:   Mon Jul 5 09:59:36 2021 -0400

    17756: Add DispatchLSF to health aggregator test setup.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>

diff --git a/sdk/go/health/aggregator_test.go b/sdk/go/health/aggregator_test.go
index 2acf3e59a..04106caa4 100644
--- a/sdk/go/health/aggregator_test.go
+++ b/sdk/go/health/aggregator_test.go
@@ -153,6 +153,7 @@ func (s *AggregatorSuite) setAllServiceURLs(listen string) {
 	for _, svc := range []*arvados.Service{
 		&svcs.Controller,
 		&svcs.DispatchCloud,
+		&svcs.DispatchLSF,
 		&svcs.Keepbalance,
 		&svcs.Keepproxy,
 		&svcs.Keepstore,

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list