import (
"bytes"
+ "context"
"fmt"
"io"
+ "io/ioutil"
"net"
"net/http"
"os"
"strings"
"time"
+ "git.arvados.org/arvados.git/lib/diagnostics"
"git.arvados.org/arvados.git/sdk/go/arvados"
"git.arvados.org/arvados.git/sdk/go/arvadostest"
- "golang.org/x/net/context"
. "gopkg.in/check.v1"
)
c.Check(s.stderr.String(), Equals, "")
}
+func (s *executorSuite) TestDiagnosticsImage(c *C) {
+ s.newExecutor(c)
+ imagefile := c.MkDir() + "/hello-world.tar"
+ err := ioutil.WriteFile(imagefile, diagnostics.HelloWorldDockerImage, 0777)
+ c.Assert(err, IsNil)
+ err = s.executor.LoadImage("", imagefile, arvados.Container{}, "", nil)
+ c.Assert(err, IsNil)
+
+ c.Logf("Using container runtime: %s", s.executor.Runtime())
+ s.spec.Image = "hello-world"
+ s.spec.Command = []string{"/hello"}
+ s.checkRun(c, 0)
+ c.Check(s.stdout.String(), Matches, `(?ms)\nHello from Docker!\n.*`)
+}
+
func (s *executorSuite) TestExitStatus(c *C) {
s.spec.Command = []string{"false"}
s.checkRun(c, 1)
// singularity also sets this by itself (v3.5.2, but not v3.7.4)
case "PROMPT_COMMAND", "PS1", "SINGULARITY_BIND", "SINGULARITY_COMMAND", "SINGULARITY_ENVIRONMENT":
// singularity also sets these by itself (v3.7.4)
+ case "SINGULARITY_NO_EVAL":
+ // our singularity driver sets this to control
+ // singularity behavior, and it gets passed
+ // through to the container
default:
got[kv[0]] = kv[1]
}