Fix files missing gofmt

pull/6/head
Daniel Smith 2014-08-12 17:18:07 -07:00
parent 713a9488a2
commit 1a5a22c539
5 changed files with 8 additions and 10 deletions

View File

@ -321,7 +321,7 @@ func ValidateReplicationController(controller *ReplicationController) []error {
errors = append(errors, makeInvalidError("ReplicationController.ReplicaSelector", controller.DesiredState.ReplicaSelector))
}
if controller.DesiredState.Replicas < 0 {
errors = append(errors, makeInvalidError("ReplicationController.Replicas", controller.DesiredState.Replicas ))
errors = append(errors, makeInvalidError("ReplicationController.Replicas", controller.DesiredState.Replicas))
}
errors = append(errors, ValidateManifest(&controller.DesiredState.PodTemplate.DesiredState.Manifest)...)
return errors

View File

@ -420,7 +420,7 @@ func TestValidateReplicationController(t *testing.T) {
"negative_replicas": {
JSONBase: JSONBase{ID: "abc"},
DesiredState: ReplicationControllerState{
Replicas: -1,
Replicas: -1,
ReplicaSelector: validSelector,
},
},

View File

@ -111,7 +111,7 @@ func TestMinionProxy(t *testing.T) {
fmt.Sprintf("/%s", proxy.Host): "/",
}
for value, _ := range failureCases {
for value := range failureCases {
resp, err := http.Get(fmt.Sprintf("%s%s", server.URL, value))
if err != nil {
t.Errorf("unexpected error for %s: %v", value, err)

View File

@ -73,11 +73,9 @@ func TestReadFromFile(t *testing.T) {
expected := CreatePodUpdate(kubelet.SET, kubelet.Pod{
Name: "test",
Manifest: api.ContainerManifest{
ID: "test",
Version: "v1beta1",
Containers: []api.Container{api.Container{
Image: "test/image"},
},
ID: "test",
Version: "v1beta1",
Containers: []api.Container{{Image: "test/image"}},
},
})
if !reflect.DeepEqual(expected, update) {

View File

@ -106,7 +106,7 @@ func TestContainer(t *testing.T) {
if len(received) != 1 {
t.Errorf("Expected 1 manifest, but got %v", len(received))
}
expectedPods := []Pod{Pod{Name: "1", Manifest: expected[0]}}
expectedPods := []Pod{{Name: "1", Manifest: expected[0]}}
if !reflect.DeepEqual(expectedPods, received[0]) {
t.Errorf("Expected %#v, but got %#v", expectedPods, received[0])
}
@ -129,7 +129,7 @@ func TestContainers(t *testing.T) {
if len(received) != 1 {
t.Errorf("Expected 1 update, but got %v", len(received))
}
expectedPods := []Pod{Pod{Name: "1", Manifest: expected[0]}, Pod{Name: "2", Manifest: expected[1]}}
expectedPods := []Pod{{Name: "1", Manifest: expected[0]}, {Name: "2", Manifest: expected[1]}}
if !reflect.DeepEqual(expectedPods, received[0]) {
t.Errorf("Expected %#v, but got %#v", expectedPods, received[0])
}