mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-13 21:25:09 +00:00
Change wardle API group to wardle.example.com
This commit is contained in:
@@ -323,13 +323,13 @@ func TestAggregatedAPIServer(t *testing.T) {
|
||||
}
|
||||
aggregatorClient := aggregatorclient.NewForConfigOrDie(aggregatorClientConfig)
|
||||
_, err = aggregatorClient.ApiregistrationV1beta1().APIServices().Create(&apiregistrationv1beta1.APIService{
|
||||
ObjectMeta: metav1.ObjectMeta{Name: "v1alpha1.wardle.k8s.io"},
|
||||
ObjectMeta: metav1.ObjectMeta{Name: "v1alpha1.wardle.example.com"},
|
||||
Spec: apiregistrationv1beta1.APIServiceSpec{
|
||||
Service: &apiregistrationv1beta1.ServiceReference{
|
||||
Namespace: "kube-wardle",
|
||||
Name: "api",
|
||||
},
|
||||
Group: "wardle.k8s.io",
|
||||
Group: "wardle.example.com",
|
||||
Version: "v1alpha1",
|
||||
CABundle: wardleCA,
|
||||
GroupPriorityMinimum: 200,
|
||||
@@ -391,7 +391,7 @@ func checkWardleUnavailableDiscoveryError(t *testing.T, err error) bool {
|
||||
t.Logf("Unexpected failed groups: %v", err)
|
||||
return false
|
||||
}
|
||||
groupVersion := schema.GroupVersion{Group: "wardle.k8s.io", Version: "v1alpha1"}
|
||||
groupVersion := schema.GroupVersion{Group: "wardle.example.com", Version: "v1alpha1"}
|
||||
groupVersionErr, ok := discoveryErr.Groups[groupVersion]
|
||||
if !ok {
|
||||
t.Logf("Unexpected failed group version: %v", err)
|
||||
@@ -475,7 +475,7 @@ func testAPIGroupList(t *testing.T, client rest.Interface) {
|
||||
}
|
||||
|
||||
func testAPIGroup(t *testing.T, client rest.Interface) {
|
||||
contents, err := readResponse(client, "/apis/wardle.k8s.io")
|
||||
contents, err := readResponse(client, "/apis/wardle.example.com")
|
||||
if err != nil {
|
||||
t.Fatalf("%v", err)
|
||||
}
|
||||
@@ -483,7 +483,7 @@ func testAPIGroup(t *testing.T, client rest.Interface) {
|
||||
var apiGroup metav1.APIGroup
|
||||
err = json.Unmarshal(contents, &apiGroup)
|
||||
if err != nil {
|
||||
t.Fatalf("Error in unmarshalling response from server %s: %v", "/apis/wardle.k8s.io", err)
|
||||
t.Fatalf("Error in unmarshalling response from server %s: %v", "/apis/wardle.example.com", err)
|
||||
}
|
||||
assert.Equal(t, wardlev1alpha1.SchemeGroupVersion.Group, apiGroup.Name)
|
||||
assert.Equal(t, 2, len(apiGroup.Versions))
|
||||
@@ -493,7 +493,7 @@ func testAPIGroup(t *testing.T, client rest.Interface) {
|
||||
}
|
||||
|
||||
func testAPIResourceList(t *testing.T, client rest.Interface) {
|
||||
contents, err := readResponse(client, "/apis/wardle.k8s.io/v1alpha1")
|
||||
contents, err := readResponse(client, "/apis/wardle.example.com/v1alpha1")
|
||||
if err != nil {
|
||||
t.Fatalf("%v", err)
|
||||
}
|
||||
@@ -501,7 +501,7 @@ func testAPIResourceList(t *testing.T, client rest.Interface) {
|
||||
var apiResourceList metav1.APIResourceList
|
||||
err = json.Unmarshal(contents, &apiResourceList)
|
||||
if err != nil {
|
||||
t.Fatalf("Error in unmarshalling response from server %s: %v", "/apis/wardle.k8s.io/v1alpha1", err)
|
||||
t.Fatalf("Error in unmarshalling response from server %s: %v", "/apis/wardle.example.com/v1alpha1", err)
|
||||
}
|
||||
assert.Equal(t, wardlev1alpha1.SchemeGroupVersion.String(), apiResourceList.GroupVersion)
|
||||
assert.Equal(t, 2, len(apiResourceList.APIResources))
|
||||
|
Reference in New Issue
Block a user