mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
Merge pull request #52339 from liggitt/alpha-test
Automatic merge from submit-queue (batch tested with PRs 52339, 52343, 52125, 52360, 52301) Prevent enabling alpha APIs by default related to #47691 This is a follow up to #51839 to add a check that we do not enable alpha APIs by default
This commit is contained in:
commit
5bc9d7b412
@ -24,6 +24,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"reflect"
|
"reflect"
|
||||||
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
appsapiv1beta1 "k8s.io/api/apps/v1beta1"
|
appsapiv1beta1 "k8s.io/api/apps/v1beta1"
|
||||||
@ -370,3 +371,12 @@ func TestAPIVersionOfDiscoveryEndpoints(t *testing.T) {
|
|||||||
assert.Equal(resourceList.APIVersion, "v1")
|
assert.Equal(resourceList.APIVersion, "v1")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestNoAlphaVersionsEnabledByDefault(t *testing.T) {
|
||||||
|
config := DefaultAPIResourceConfigSource()
|
||||||
|
for gv, gvConfig := range config.GroupVersionResourceConfigs {
|
||||||
|
if gvConfig.Enable && strings.Contains(gv.Version, "alpha") {
|
||||||
|
t.Errorf("Alpha API version %s enabled by default", gv.String())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user