Remove Codec from ContentConfig.

This commit is contained in:
Wojciech Tyczynski
2016-05-04 12:24:16 +02:00
parent 2da247ffbc
commit 7403564366
43 changed files with 260 additions and 264 deletions

View File

@@ -310,7 +310,7 @@ func TestLabelErrors(t *testing.T) {
}
for k, testCase := range testCases {
f, tf, _ := NewAPIFactory()
f, tf, _, _ := NewAPIFactory()
tf.Printer = &testPrinter{}
tf.Namespace = "test"
tf.ClientConfig = &restclient.Config{ContentConfig: restclient.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}
@@ -338,9 +338,9 @@ func TestLabelErrors(t *testing.T) {
func TestLabelForResourceFromFile(t *testing.T) {
pods, _, _ := testData()
f, tf, codec := NewAPIFactory()
f, tf, codec, ns := NewAPIFactory()
tf.Client = &fake.RESTClient{
Codec: codec,
NegotiatedSerializer: ns,
Client: fake.CreateHTTPClient(func(req *http.Request) (*http.Response, error) {
switch req.Method {
case "GET":
@@ -385,9 +385,9 @@ func TestLabelForResourceFromFile(t *testing.T) {
func TestLabelMultipleObjects(t *testing.T) {
pods, _, _ := testData()
f, tf, codec := NewAPIFactory()
f, tf, codec, ns := NewAPIFactory()
tf.Client = &fake.RESTClient{
Codec: codec,
NegotiatedSerializer: ns,
Client: fake.CreateHTTPClient(func(req *http.Request) (*http.Response, error) {
switch req.Method {
case "GET":