X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/483ca35ac4348924cfbc187dab4f1b88a272eea7..6c0bf267d795a3ca49c3258c9490714c9e18d333:/services/crunch-dispatch-slurm/crunch-dispatch-slurm_test.go diff --git a/services/crunch-dispatch-slurm/crunch-dispatch-slurm_test.go b/services/crunch-dispatch-slurm/crunch-dispatch-slurm_test.go index 6692f7f80e..e7ccf25fc9 100644 --- a/services/crunch-dispatch-slurm/crunch-dispatch-slurm_test.go +++ b/services/crunch-dispatch-slurm/crunch-dispatch-slurm_test.go @@ -143,7 +143,7 @@ func (s *TestSuite) integrationTest(c *C, c.Check(err, IsNil) c.Check(len(containers.Items), Equals, 1) - config.CrunchRunCommand = []string{"echo"} + theConfig.CrunchRunCommand = []string{"echo"} doneProcessing := make(chan struct{}) dispatcher := dispatch.Dispatcher{ @@ -193,7 +193,7 @@ func testWithServerStub(c *C, apiStubResponses map[string]arvadostest.StubRespon api := httptest.NewServer(&apiStub) defer api.Close() - arv := arvadosclient.ArvadosClient{ + arv := &arvadosclient.ArvadosClient{ Scheme: "http", ApiServer: api.URL[7:], ApiToken: "abc123", @@ -205,7 +205,7 @@ func testWithServerStub(c *C, apiStubResponses map[string]arvadostest.StubRespon log.SetOutput(io.MultiWriter(buf, os.Stderr)) defer log.SetOutput(os.Stderr) - config.CrunchRunCommand = []string{crunchCmd} + theConfig.CrunchRunCommand = []string{crunchCmd} doneProcessing := make(chan struct{}) dispatcher := dispatch.Dispatcher{ @@ -303,14 +303,14 @@ func (s *MockArvadosServerSuite) TestSbatchFuncWithConfigArgs(c *C) { } func testSbatchFuncWithArgs(c *C, args []string) { - config.SbatchArguments = append(config.SbatchArguments, args...) + theConfig.SbatchArguments = append(theConfig.SbatchArguments, args...) container := arvados.Container{UUID: "123", RuntimeConstraints: arvados.RuntimeConstraints{RAM: 1000000, VCPUs: 2}} sbatchCmd := sbatchFunc(container) var expected []string expected = append(expected, "sbatch", "--share") - expected = append(expected, config.SbatchArguments...) + expected = append(expected, theConfig.SbatchArguments...) expected = append(expected, "--job-name=123", "--mem-per-cpu=1", "--cpus-per-task=2") c.Check(sbatchCmd.Args, DeepEquals, expected)