mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-25 06:24:59 +00:00
Remove v1alpha1 of the execcredential
Signed-off-by: Margo Crawford <margaretc@vmware.com> Kubernetes-commit: 5b690b44d08807c6434a421b0041ef685482d337
This commit is contained in:
committed by
Kubernetes Publisher
parent
c47b802895
commit
28b9e26d5f
@@ -25,7 +25,6 @@ import (
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
clientauthenticationv1 "k8s.io/client-go/pkg/apis/clientauthentication/v1"
|
||||
clientauthenticationv1alpha1 "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1"
|
||||
clientauthenticationv1beta1 "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1"
|
||||
"k8s.io/client-go/rest"
|
||||
)
|
||||
@@ -243,11 +242,6 @@ func TestLoadExecCredential(t *testing.T) {
|
||||
data: marshal(t, clientauthenticationv1beta1.SchemeGroupVersion, &clientauthenticationv1beta1.ExecCredential{}),
|
||||
wantErrorPrefix: "ExecCredential does not contain cluster information",
|
||||
},
|
||||
{
|
||||
name: "v1alpha1",
|
||||
data: marshal(t, clientauthenticationv1alpha1.SchemeGroupVersion, &clientauthenticationv1alpha1.ExecCredential{}),
|
||||
wantErrorPrefix: "ExecCredential does not contain cluster information",
|
||||
},
|
||||
{
|
||||
name: "invalid object kind",
|
||||
data: marshal(t, metav1.SchemeGroupVersion, &metav1.Status{}),
|
||||
|
@@ -24,7 +24,6 @@ import (
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/util/sets"
|
||||
clientauthenticationv1 "k8s.io/client-go/pkg/apis/clientauthentication/v1"
|
||||
clientauthenticationv1alpha1 "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1"
|
||||
clientauthenticationv1beta1 "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1"
|
||||
clientcmdv1 "k8s.io/client-go/tools/clientcmd/api/v1"
|
||||
)
|
||||
@@ -139,15 +138,13 @@ func testClientAuthenticationClusterTypesAreSynced(t *testing.T, cluster interfa
|
||||
}
|
||||
|
||||
// TestAllClusterTypesAreSynced is a TODO so that we remember to write a test similar to
|
||||
// TestV1beta1ClusterTypesAreSynced for any future ExecCredential version. It should start failing
|
||||
// TestClientAuthenticationClusterTypesAreSynced for any future ExecCredential version. It should start failing
|
||||
// when someone adds support for any other ExecCredential type to this package.
|
||||
func TestAllClusterTypesAreSynced(t *testing.T) {
|
||||
versionsThatDontNeedTests := sets.NewString(
|
||||
// The internal Cluster type should only be used...internally...and therefore doesn't
|
||||
// necessarily need to be synced with clientcmdv1.
|
||||
runtime.APIVersionInternal,
|
||||
// V1alpha1 does not contain a Cluster type.
|
||||
clientauthenticationv1alpha1.SchemeGroupVersion.Version,
|
||||
// We have a test for v1beta1 above.
|
||||
clientauthenticationv1beta1.SchemeGroupVersion.Version,
|
||||
// We have a test for v1 above.
|
||||
|
Reference in New Issue
Block a user