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

@@ -389,7 +389,7 @@ func TestAnnotateErrors(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()}}
@@ -419,10 +419,10 @@ func TestAnnotateErrors(t *testing.T) {
func TestAnnotateObject(t *testing.T) {
pods, _, _ := testData()
f, tf, codec := NewAPIFactory()
f, tf, codec, ns := NewAPIFactory()
tf.Printer = &testPrinter{}
tf.Client = &fake.RESTClient{
Codec: codec,
NegotiatedSerializer: ns,
Client: fake.CreateHTTPClient(func(req *http.Request) (*http.Response, error) {
switch req.Method {
case "GET":
@@ -469,10 +469,10 @@ func TestAnnotateObject(t *testing.T) {
func TestAnnotateObjectFromFile(t *testing.T) {
pods, _, _ := testData()
f, tf, codec := NewAPIFactory()
f, tf, codec, ns := NewAPIFactory()
tf.Printer = &testPrinter{}
tf.Client = &fake.RESTClient{
Codec: codec,
NegotiatedSerializer: ns,
Client: fake.CreateHTTPClient(func(req *http.Request) (*http.Response, error) {
switch req.Method {
case "GET":
@@ -520,10 +520,10 @@ func TestAnnotateObjectFromFile(t *testing.T) {
func TestAnnotateMultipleObjects(t *testing.T) {
pods, _, _ := testData()
f, tf, codec := NewAPIFactory()
f, tf, codec, ns := NewAPIFactory()
tf.Printer = &testPrinter{}
tf.Client = &fake.RESTClient{
Codec: codec,
NegotiatedSerializer: ns,
Client: fake.CreateHTTPClient(func(req *http.Request) (*http.Response, error) {
switch req.Method {
case "GET":