Skip to content

Commit

Permalink
Merge pull request #90 from base2Services/feature/web-socket-fixes
Browse files Browse the repository at this point in the history
Updated web socket check
  • Loading branch information
Guslington authored Nov 13, 2022
2 parents 0ef1763 + ae39c1a commit d0e4300
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/cfnguardian/models/check.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def initialize(resource)
@name = 'WebSocketCheck'
@package = 'websocket-check'
@handler = 'handler.websocket_check'
@version = '1f242f6741f6b561f22f6761a1287e7a0b69d06f'
@version = 'fb374fcf606b921d3745d7171d81ab5a32135d2f'
@runtime = 'python3.7'
@branch = 'main'
end
Expand Down
5 changes: 3 additions & 2 deletions lib/cfnguardian/models/event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,16 @@ def initialize(resource)
@endpoint = resource['Id']
@message = resource.fetch('Message',nil)
@expected_response = resource.fetch('Expected_Response',nil)
@timeout = resource.fetch('Timeout',50)
@timeout = resource.fetch('Timeout',30)
@payload = resource.fetch('Payload',nil)
end

def payload
payload = {
'ENDPOINT' => @endpoint,
'MESSAGE' => @message,
'EXPECTED_RESPONSE' => @expected_response
'EXPECTED_RESPONSE' => @expected_response,
'TIMEOUT' => @timeout
}
payload['PAYLOAD'] = @payload unless @payload.nil?
return payload.to_json
Expand Down

0 comments on commit d0e4300

Please sign in to comment.