Replace to tag

Use a testing pkg to replace testing util codes
This commit is contained in:
harry
2016-01-15 14:33:50 +08:00
parent 33c72db59c
commit 98222b4d8b
12 changed files with 41 additions and 37 deletions

View File

@@ -34,6 +34,7 @@ import (
"k8s.io/kubernetes/pkg/securitycontext"
"k8s.io/kubernetes/pkg/util"
"k8s.io/kubernetes/pkg/util/sets"
utiltesting "k8s.io/kubernetes/pkg/util/testing"
"k8s.io/kubernetes/pkg/watch"
)
@@ -210,7 +211,7 @@ func TestSyncReplicationControllerCreates(t *testing.T) {
func TestStatusUpdatesWithoutReplicasChange(t *testing.T) {
// Setup a fake server to listen for requests, and run the rc manager in steady state
fakeHandler := util.FakeHandler{
fakeHandler := utiltesting.FakeHandler{
StatusCode: 200,
ResponseBody: "",
}
@@ -252,7 +253,7 @@ func TestStatusUpdatesWithoutReplicasChange(t *testing.T) {
func TestControllerUpdateReplicas(t *testing.T) {
// This is a happy server just to record the PUT request we expect for status.Replicas
fakeHandler := util.FakeHandler{
fakeHandler := utiltesting.FakeHandler{
StatusCode: 200,
ResponseBody: "",
}
@@ -292,7 +293,7 @@ func TestControllerUpdateReplicas(t *testing.T) {
func TestSyncReplicationControllerDormancy(t *testing.T) {
// Setup a test server so we can lie about the current state of pods
fakeHandler := util.FakeHandler{
fakeHandler := utiltesting.FakeHandler{
StatusCode: 200,
ResponseBody: "",
}
@@ -552,7 +553,7 @@ func TestUpdatePods(t *testing.T) {
func TestControllerUpdateRequeue(t *testing.T) {
// This server should force a requeue of the controller because it fails to update status.Replicas.
fakeHandler := util.FakeHandler{
fakeHandler := utiltesting.FakeHandler{
StatusCode: 500,
ResponseBody: "",
}