mirror of
https://github.com/httprunner/httprunner.git
synced 2026-08-28 19:47:14 +08:00
change: rename ws action type
This commit is contained in:
@@ -1 +1 @@
|
|||||||
v5.0.0+2411112135
|
v5.0.0+2411112155
|
||||||
|
|||||||
@@ -31,12 +31,12 @@ type wsSession struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
wsOpen ActionType = "open"
|
wsOpen WSActionType = "open"
|
||||||
wsPing ActionType = "ping"
|
wsPing WSActionType = "ping"
|
||||||
wsWriteAndRead ActionType = "wr"
|
wsWriteAndRead WSActionType = "wr"
|
||||||
wsRead ActionType = "r"
|
wsRead WSActionType = "r"
|
||||||
wsWrite ActionType = "w"
|
wsWrite WSActionType = "w"
|
||||||
wsClose ActionType = "close"
|
wsClose WSActionType = "close"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -45,9 +45,9 @@ const (
|
|||||||
defaultWriteWait = 5 * time.Second // default timeout 5 seconds for writing control message
|
defaultWriteWait = 5 * time.Second // default timeout 5 seconds for writing control message
|
||||||
)
|
)
|
||||||
|
|
||||||
type ActionType string
|
type WSActionType string
|
||||||
|
|
||||||
func (at ActionType) toString() string {
|
func (at WSActionType) toString() string {
|
||||||
switch at {
|
switch at {
|
||||||
case wsOpen:
|
case wsOpen:
|
||||||
return "open new connection"
|
return "open new connection"
|
||||||
@@ -243,7 +243,7 @@ func (s *StepWebSocket) Extract() *StepRequestExtraction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type WebSocketAction struct {
|
type WebSocketAction struct {
|
||||||
Type ActionType `json:"type" yaml:"type"`
|
Type WSActionType `json:"type" yaml:"type"`
|
||||||
URL string `json:"url" yaml:"url"`
|
URL string `json:"url" yaml:"url"`
|
||||||
Params map[string]interface{} `json:"params,omitempty" yaml:"params,omitempty"`
|
Params map[string]interface{} `json:"params,omitempty" yaml:"params,omitempty"`
|
||||||
Headers map[string]string `json:"headers,omitempty" yaml:"headers,omitempty"`
|
Headers map[string]string `json:"headers,omitempty" yaml:"headers,omitempty"`
|
||||||
|
|||||||
Reference in New Issue
Block a user