Remove extra test flags from all commands

Currently all commands are being build with extra flags. The extra
flags appear because of a direct import of the testing package from
the fake_etcd_client.go source file.

Remove the direct import of the testing package. Add a tools.T
interface to support existing behavior. Also clean up two TODO items
by remove using of the expectError and expectNoError functions.

Fixes #579
This commit is contained in:
Kelsey Hightower
2014-07-27 06:30:32 -07:00
parent 8a5cc87df8
commit 87fa19cdfe
5 changed files with 68 additions and 38 deletions

View File

@@ -24,20 +24,6 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet"
)
// TODO: remove this
func expectError(t *testing.T, err error) {
if err == nil {
t.Errorf("Expected error, Got %v", err)
}
}
// TODO: remove this
func expectNoError(t *testing.T, err error) {
if err != nil {
t.Errorf("Expected no error, Got %v", err)
}
}
func expectEmptyChannel(t *testing.T, ch <-chan interface{}) {
select {
case update := <-ch: