Prepare for content-type negotiation
Combine the fields that will be used for content transformation (content-type, codec, and group version) into a single struct in client, and then pass that struct into the rest client and request. Set the content-type when sending requests to the server, and accept the content type as primary. Will form the foundation for content-negotiation via the client.
This commit is contained in:
@@ -1328,7 +1328,7 @@ func TestUpdateWithRetries(t *testing.T) {
|
||||
}
|
||||
}),
|
||||
}
|
||||
clientConfig := &client.Config{GroupVersion: testapi.Default.GroupVersion()}
|
||||
clientConfig := &client.Config{ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}
|
||||
client := client.NewOrDie(clientConfig)
|
||||
client.Client = fakeClient.Client
|
||||
|
||||
@@ -1425,7 +1425,7 @@ func TestAddDeploymentHash(t *testing.T) {
|
||||
}
|
||||
}),
|
||||
}
|
||||
clientConfig := &client.Config{GroupVersion: testapi.Default.GroupVersion()}
|
||||
clientConfig := &client.Config{ContentConfig: client.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}
|
||||
client := client.NewOrDie(clientConfig)
|
||||
client.Client = fakeClient.Client
|
||||
|
||||
|
||||
Reference in New Issue
Block a user