Update client callers to use explicit versions

This commit is contained in:
Jordan Liggitt
2019-02-22 10:27:46 -05:00
parent 93be54b288
commit d1e865ee34
48 changed files with 215 additions and 214 deletions

View File

@@ -66,7 +66,7 @@ func TestFinalizeNamespaceFunc(t *testing.T) {
},
}
d := namespacedResourcesDeleter{
nsClient: mockClient.Core().Namespaces(),
nsClient: mockClient.CoreV1().Namespaces(),
finalizerToken: v1.FinalizerKubernetes,
}
d.finalizeNamespace(testNamespace)
@@ -180,7 +180,7 @@ func testSyncNamespaceThatIsTerminating(t *testing.T, versions *metav1.APIVersio
fn := func() ([]*metav1.APIResourceList, error) {
return resources, nil
}
d := NewNamespacedResourcesDeleter(mockClient.Core().Namespaces(), dynamicClient, mockClient.Core(), fn, v1.FinalizerKubernetes, true)
d := NewNamespacedResourcesDeleter(mockClient.CoreV1().Namespaces(), dynamicClient, mockClient.CoreV1(), fn, v1.FinalizerKubernetes, true)
if err := d.Delete(testInput.testNamespace.Name); err != nil {
t.Errorf("scenario %s - Unexpected error when synching namespace %v", scenario, err)
}
@@ -219,7 +219,7 @@ func TestRetryOnConflictError(t *testing.T) {
}
namespace := &v1.Namespace{}
d := namespacedResourcesDeleter{
nsClient: mockClient.Core().Namespaces(),
nsClient: mockClient.CoreV1().Namespaces(),
}
_, err := d.retryOnConflictError(namespace, retryOnce)
if err != nil {
@@ -255,7 +255,7 @@ func TestSyncNamespaceThatIsActive(t *testing.T) {
fn := func() ([]*metav1.APIResourceList, error) {
return testResources(), nil
}
d := NewNamespacedResourcesDeleter(mockClient.Core().Namespaces(), nil, mockClient.Core(),
d := NewNamespacedResourcesDeleter(mockClient.CoreV1().Namespaces(), nil, mockClient.CoreV1(),
fn, v1.FinalizerKubernetes, true)
err := d.Delete(testNamespace.Name)
if err != nil {