Fix testcases for new object field protocol

This commit is contained in:
terry-xiaoyu 2019-09-21 12:37:08 +08:00
parent 18edf5cec3
commit eb0826ef3f
3 changed files with 3 additions and 0 deletions

View File

@ -180,6 +180,7 @@ init({Transport, RawSocket, Options}) ->
ChanState = emqx_channel:init(#{peername => Peername, ChanState = emqx_channel:init(#{peername => Peername,
sockname => Sockname, sockname => Sockname,
peercert => Peercert, peercert => Peercert,
protocol => mqtt,
conn_mod => ?MODULE}, Options), conn_mod => ?MODULE}, Options),
IdleTimout = emqx_zone:get_env(Zone, idle_timeout, 30000), IdleTimout = emqx_zone:get_env(Zone, idle_timeout, 30000),
State = #connection{transport = Transport, State = #connection{transport = Transport,

View File

@ -181,6 +181,7 @@ websocket_init([Req, Opts]) ->
sockname => Sockname, sockname => Sockname,
peercert => Peercert, peercert => Peercert,
ws_cookie => WsCookie, ws_cookie => WsCookie,
protocol => mqtt,
conn_mod => ?MODULE conn_mod => ?MODULE
}, Opts), }, Opts),
Zone = proplists:get_value(zone, Opts), Zone = proplists:get_value(zone, Opts),

View File

@ -293,6 +293,7 @@ with_channel(TestFun) ->
expiry_interval => 60 expiry_interval => 60
}, },
ClientInfo = #{zone => <<"external">>, ClientInfo = #{zone => <<"external">>,
protocol => mqtt,
peerhost => {127,0,0,1}, peerhost => {127,0,0,1},
client_id => <<"clientid">>, client_id => <<"clientid">>,
username => <<"username">>, username => <<"username">>,