1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #2752 from dotcloud/gofmt_test

Go fmt tests
This commit is contained in:
Michael Crosby 2013-11-18 11:34:59 -08:00
commit 4546832507
4 changed files with 158 additions and 168 deletions

View file

@ -17,4 +17,3 @@ func TestJsonContentType(t *testing.T) {
t.Fail()
}
}

View file

@ -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)

View file

@ -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", "")

View file

@ -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) {