mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
commit
4546832507
4 changed files with 158 additions and 168 deletions
|
@ -17,4 +17,3 @@ func TestJsonContentType(t *testing.T) {
|
|||
t.Fail()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ import (
|
|||
"time"
|
||||
)
|
||||
|
||||
|
||||
func TestGetVersion(t *testing.T) {
|
||||
eng := NewTestEngine(t)
|
||||
defer mkRuntimeFromEngine(eng, t).Nuke()
|
||||
|
@ -45,7 +44,6 @@ func TestGetVersion(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
func TestGetInfo(t *testing.T) {
|
||||
eng := NewTestEngine(t)
|
||||
defer mkRuntimeFromEngine(eng, t).Nuke()
|
||||
|
@ -185,7 +183,6 @@ func TestGetImagesJSON(t *testing.T) {
|
|||
}
|
||||
assertHttpNotError(r2, t)
|
||||
|
||||
|
||||
images2 := []docker.APIImages{}
|
||||
if err := json.Unmarshal(r2.Body.Bytes(), &images2); err != nil {
|
||||
t.Fatal(err)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package docker
|
||||
|
||||
import (
|
||||
"github.com/dotcloud/docker/auth"
|
||||
"crypto/rand"
|
||||
"encoding/hex"
|
||||
"github.com/dotcloud/docker/auth"
|
||||
"os"
|
||||
"strings"
|
||||
"testing"
|
||||
|
@ -27,8 +27,6 @@ func TestLogin(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
func TestCreateAccount(t *testing.T) {
|
||||
os.Setenv("DOCKER_INDEX_URL", "https://indexstaging-docker.dotcloud.com")
|
||||
defer os.Setenv("DOCKER_INDEX_URL", "")
|
||||
|
|
|
@ -3,10 +3,10 @@ package docker
|
|||
import (
|
||||
"archive/tar"
|
||||
"bytes"
|
||||
"fmt"
|
||||
"github.com/dotcloud/docker"
|
||||
"github.com/dotcloud/docker/engine"
|
||||
"github.com/dotcloud/docker/utils"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
|
@ -64,7 +64,6 @@ func startContainer(eng *engine.Engine, id string, t utils.Fataler) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
func containerRun(eng *engine.Engine, id string, t utils.Fataler) {
|
||||
startContainer(eng, id, t)
|
||||
containerWait(eng, id, t)
|
||||
|
@ -97,12 +96,10 @@ func containerAttach(eng *engine.Engine, id string, t utils.Fataler) (io.WriteCl
|
|||
return i, o
|
||||
}
|
||||
|
||||
|
||||
func containerWait(eng *engine.Engine, id string, t utils.Fataler) int {
|
||||
return getContainer(eng, id, t).Wait()
|
||||
}
|
||||
|
||||
|
||||
func containerWaitTimeout(eng *engine.Engine, id string, t utils.Fataler) error {
|
||||
return getContainer(eng, id, t).WaitTimeout(500 * time.Millisecond)
|
||||
}
|
||||
|
@ -137,7 +134,6 @@ func assertHttpNotError(r *httptest.ResponseRecorder, t utils.Fataler) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// assertHttpError expect the given response to have an error.
|
||||
// Otherwise the it causes the test to fail.
|
||||
func assertHttpError(r *httptest.ResponseRecorder, t utils.Fataler) {
|
||||
|
|
Loading…
Add table
Reference in a new issue