Remove parts of TestRootAPIPaths
@@ -3,15 +3,11 @@ package integration
import (
"encoding/json"
"net/http"
- "strings"
"testing"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/util/sets"
restclient "k8s.io/client-go/rest"
- kapi "k8s.io/kubernetes/pkg/apis/core"
- configapi "github.com/openshift/origin/pkg/cmd/server/apis/config"
testutil "github.com/openshift/origin/test/util"
testserver "github.com/openshift/origin/test/util/server"
)
@@ -46,28 +42,6 @@ func TestRootAPIPaths(t *testing.T) {
}
defer rootResponse.Body.Close()
- // We need to make sure that any APILevels specified in the config are present in the RootPaths, and that
- // any not specified are not
- expectedOpenShiftAPILevels := sets.NewString(masterConfig.APILevels...)
- expectedKubeAPILevels := sets.NewString(configapi.GetEnabledAPIVersionsForGroup(masterConfig.KubernetesMasterConfig, kapi.GroupName)...)
- actualOpenShiftAPILevels := sets.String{}
- actualKubeAPILevels := sets.String{}
- for _, route := range broadcastRootPaths.Paths {
- if strings.HasPrefix(route, "/oapi/") {
- actualOpenShiftAPILevels.Insert(route[6:])
- }
-
- if strings.HasPrefix(route, "/api/") {
- actualKubeAPILevels.Insert(route[5:])
- }
- }
- if !expectedOpenShiftAPILevels.Equal(actualOpenShiftAPILevels) {
- t.Errorf("actual OpenShift API levels served don't match expected levels:\n\texpected:\n\t%s\n\tgot:\n\t%s", expectedOpenShiftAPILevels.List(), actualOpenShiftAPILevels.List())
- }
- if !expectedKubeAPILevels.Equal(actualKubeAPILevels) {
- t.Errorf("actual Kube API levels served don't match expected levels:\n\texpected:\n\t%s\n\tgot:\n\t%s", expectedKubeAPILevels.List(), actualKubeAPILevels.List())
- }
-
// Send a GET to every advertised address and check that we get the correct response
for _, route := range broadcastRootPaths.Paths {
req, err := http.NewRequest("GET", masterConfig.OAuthConfig.MasterPublicURL+route, nil)
