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:
@@ -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:
|
||||
|
Reference in New Issue
Block a user