Skip to content

Commit

Permalink
Merge pull request #52339 from liggitt/alpha-test
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Kubernetes Submit Queue committed Sep 13, 2017
2 parents 9636522 + d8bf502 commit 5bc9d7b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/master/master_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"net/http"
"net/http/httptest"
"reflect"
"strings"
"testing"

appsapiv1beta1 "k8s.io/api/apps/v1beta1"
Expand Down Expand Up @@ -370,3 +371,12 @@ func TestAPIVersionOfDiscoveryEndpoints(t *testing.T) {
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())
}
}
}

0 comments on commit 5bc9d7b

Please sign in to comment.