[ARVADOS] updated: c993b82cdb7e55502c55852cd32ae305f5491028

Git user git at public.curoverse.com
Wed Jul 27 17:33:20 EDT 2016


Summary of changes:
 .../crunch-dispatch-slurm_test.go                     | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

       via  c993b82cdb7e55502c55852cd32ae305f5491028 (commit)
      from  5d563fd582659c81cbdd146d049c5c731ea9e742 (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 c993b82cdb7e55502c55852cd32ae305f5491028
Author: radhika <radhika at curoverse.com>
Date:   Wed Jul 27 17:13:11 2016 -0400

    9581: test updates

diff --git a/services/crunch-dispatch-slurm/crunch-dispatch-slurm_test.go b/services/crunch-dispatch-slurm/crunch-dispatch-slurm_test.go
index 163059a..a559298 100644
--- a/services/crunch-dispatch-slurm/crunch-dispatch-slurm_test.go
+++ b/services/crunch-dispatch-slurm/crunch-dispatch-slurm_test.go
@@ -10,7 +10,6 @@ import (
 	"io"
 	"io/ioutil"
 	"log"
-	"math"
 	"net/http"
 	"net/http/httptest"
 	"os"
@@ -292,14 +291,18 @@ func (s *MockArvadosServerSuite) TestReadConfig(c *C) {
 	c.Check(args, DeepEquals, config.SbatchArguments)
 }
 
-func (s *MockArvadosServerSuite) TestSbatchFuncWithConfigArgs(c *C) {
-	testSbatchFuncWithArgs(c, []string{"--arg1=v1", "--arg2"})
+func (s *MockArvadosServerSuite) TestSbatchFuncWithNoConfigArgs(c *C) {
+	testSbatchFuncWithArgs(c, nil)
 }
 
-func (s *MockArvadosServerSuite) TestSbatchFuncWithNoConfigArgs(c *C) {
+func (s *MockArvadosServerSuite) TestSbatchFuncWithEmptyConfigArgs(c *C) {
 	testSbatchFuncWithArgs(c, []string{})
 }
 
+func (s *MockArvadosServerSuite) TestSbatchFuncWithConfigArgs(c *C) {
+	testSbatchFuncWithArgs(c, []string{"--arg1=v1", "--arg2"})
+}
+
 func testSbatchFuncWithArgs(c *C, args []string) {
 	config.SbatchArguments = append(config.SbatchArguments, args...)
 
@@ -307,13 +310,9 @@ func testSbatchFuncWithArgs(c *C, args []string) {
 	sbatchCmd := sbatchFunc(container)
 
 	var expected []string
-	expected = append(expected, "sbatch")
-	expected = append(expected, "--share")
+	expected = append(expected, "sbatch", "--share")
 	expected = append(expected, config.SbatchArguments...)
-	expected = append(expected, fmt.Sprintf("--job-name=%s", container.UUID))
-	memPerCPU := math.Ceil(float64(container.RuntimeConstraints.RAM) / (float64(container.RuntimeConstraints.VCPUs) * 1048576))
-	expected = append(expected, fmt.Sprintf("--mem-per-cpu=%d", int(memPerCPU)))
-	expected = append(expected, fmt.Sprintf("--cpus-per-task=2"))
+	expected = append(expected, "--job-name=123", "--mem-per-cpu=1", "--cpus-per-task=2")
 
 	c.Check(sbatchCmd.Args, DeepEquals, expected)
 }

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list