19166: Pass GatewayAuthSecret to crunch-run through lsf/slurm.
[arvados.git] / services / crunch-dispatch-slurm / script_test.go
index 00d70190dd043416302c38fc526dc551dc08f687..bba9a05755cb36ec9848d11b17bc0187657e87d3 100644 (file)
@@ -23,6 +23,7 @@ func (s *ScriptSuite) TestExecScript(c *C) {
                {[]string{`foo"`, "'waz 'qux\n"}, `exec 'foo"' ''\''waz '\''qux` + "\n" + `'`},
        } {
                c.Logf("%+v -> %+v", test.args, test.script)
-               c.Check(execScript(test.args), Equals, "#!/bin/sh\n"+test.script+"\n")
+               c.Check(execScript(test.args, nil), Equals, "#!/bin/sh\n"+test.script+"\n")
        }
+       c.Check(execScript([]string{"sh", "-c", "echo $foo"}, map[string]string{"foo": "b'ar"}), Equals, "#!/bin/sh\nfoo='b'\\''ar' exec 'sh' '-c' 'echo $foo'\n")
 }