summaryrefslogtreecommitdiffhomepage
path: root/runsc/test/image/python_test.go
diff options
context:
space:
mode:
authorJustine Olshan <justineolshan@google.com>2018-07-11 09:36:20 -0700
committerShentubot <shentubot@google.com>2018-07-11 09:37:28 -0700
commit81ae5f3df533d5e5990baaa105392f59e28d5730 (patch)
tree8a90d2fbca329391f2586b028cef7be7e14ae09f /runsc/test/image/python_test.go
parent9cd69c2f3db7fd4b30d14d86be5fb5a3401054e5 (diff)
Created runsc and docker integration tests.
Moved some of the docker image functions to testutil.go. Test runsc commands create, start, stop, pause, and resume. PiperOrigin-RevId: 204138452 Change-Id: Id00bc58d2ad230db5e9e905eed942187e68e7c7b
Diffstat (limited to 'runsc/test/image/python_test.go')
-rw-r--r--runsc/test/image/python_test.go14
1 files changed, 8 insertions, 6 deletions
diff --git a/runsc/test/image/python_test.go b/runsc/test/image/python_test.go
index e931bb444..f0dab3989 100644
--- a/runsc/test/image/python_test.go
+++ b/runsc/test/image/python_test.go
@@ -19,23 +19,25 @@ import (
"net/http"
"testing"
"time"
+
+ "gvisor.googlesource.com/gvisor/runsc/test/testutil"
)
func TestPythonHello(t *testing.T) {
- d := makeDocker("python-hello-test")
- if out, err := d.run("-p", "8080", "google/python-hello"); err != nil {
+ d := testutil.MakeDocker("python-hello-test")
+ if out, err := d.Run("-p", "8080", "google/python-hello"); err != nil {
t.Fatalf("docker run failed: %v\nout: %s", err, out)
}
- defer d.cleanUp()
+ defer d.CleanUp()
// Find where port 8080 is mapped to.
- port, err := d.findPort(8080)
+ port, err := d.FindPort(8080)
if err != nil {
- t.Fatalf("docker.findPort(8080) failed: %v", err)
+ t.Fatalf("docker.FindPort(8080) failed: %v", err)
}
// Wait until it's up and running.
- if err := d.waitForHTTP(port, 5*time.Second); err != nil {
+ if err := d.WaitForHTTP(port, 5*time.Second); err != nil {
t.Fatalf("docker.WaitForHTTP() timeout: %v", err)
}