Allocate mux in master.New()
Callsites no longer allocate a mux. Master now exposes method to install handlers which use the master's auth code. Not used but forks (openshift) are expected to use these methods. These methods will later be a point for additional plug-in functionality. Integration tests now use the master-provided handler which has auth, rather than using the mux, which didn't. Fix TestWhoAmI now that /_whoami sits behind auth.
This commit is contained in:
@@ -19,7 +19,6 @@ limitations under the License.
|
||||
package integration
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"reflect"
|
||||
"testing"
|
||||
@@ -40,17 +39,14 @@ func TestClient(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected error: %v", err)
|
||||
}
|
||||
mux := http.NewServeMux()
|
||||
|
||||
master.New(&master.Config{
|
||||
m := master.New(&master.Config{
|
||||
EtcdHelper: helper,
|
||||
Mux: mux,
|
||||
EnableLogsSupport: false,
|
||||
EnableUISupport: false,
|
||||
APIPrefix: "/api",
|
||||
})
|
||||
|
||||
s := httptest.NewServer(mux)
|
||||
s := httptest.NewServer(m.Handler)
|
||||
|
||||
testCases := []string{
|
||||
"v1beta1",
|
||||
|
Reference in New Issue
Block a user