diff options
| author | vincentgoat <linguohui1@huawei.com> | 2022-06-23 16:29:14 +0800 |
|---|---|---|
| committer | vincentgoat <linguohui1@huawei.com> | 2022-06-28 20:58:37 +0800 |
| commit | ceec77dbfe31d382c308146cabbfbb5227edced2 (patch) | |
| tree | 625bd0f4e91c7bc2dd4b46196dde8f9dc043a961 /edge/test | |
| parent | Merge pull request #3943 from gy95/release (diff) | |
| download | kubeedge-ceec77dbfe31d382c308146cabbfbb5227edced2.tar.gz | |
update deprecate dependency
Signed-off-by: vincentgoat <linguohui1@huawei.com>
Diffstat (limited to 'edge/test')
| -rw-r--r-- | edge/test/cloudhub/stub.go | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/edge/test/cloudhub/stub.go b/edge/test/cloudhub/stub.go index 4f4de193a..149b1d4ea 100644 --- a/edge/test/cloudhub/stub.go +++ b/edge/test/cloudhub/stub.go @@ -5,7 +5,6 @@ import ( "io" "net/http" - "github.com/gorilla/mux" "github.com/gorilla/websocket" v1 "k8s.io/api/core/v1" "k8s.io/klog/v2" @@ -113,13 +112,12 @@ func (tm *stubCloudHub) podHandler(w http.ResponseWriter, req *http.Request) { func (tm *stubCloudHub) Start() { defer tm.Cleanup() - router := mux.NewRouter() - router.HandleFunc("/{group_id}/events", tm.serveEvent) // for edge-hub - router.HandleFunc("/pod", tm.podHandler) // for pod test - + mux := http.NewServeMux() + mux.HandleFunc("/{group_id}/events", tm.serveEvent) // for edge-hub + mux.HandleFunc("/pod", tm.podHandler) // for pod test s := http.Server{ Addr: "127.0.0.1:20000", - Handler: router, + Handler: mux, } klog.Info("Start cloud hub service") err := s.ListenAndServe() |
