bugsnag-maze-runner 9.8.0 → 9.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b6101c495b7debb939e4bb83f21dbc015c13f7bc58ce797d69fb90e618c6be6d
4
- data.tar.gz: 69f5fdd5eec4c1f5bc8e9ed2aaa188531a6f54e80ec26471873ef93e7ecb1ecd
3
+ metadata.gz: 05620dbfd42646b2996821130544d406245079555a8b6c527af25eb1b3c66bae
4
+ data.tar.gz: d58825fa3af12c8dcb65dd6d521e7eb3cc9c28afb973764db9d27679a52cfd97
5
5
  SHA512:
6
- metadata.gz: '0438524dc2173c1f31b323cca182e651ea1fc095727ee4658c5bb14baa986b5a17230fcd64460dd9eb9e805469c84eae2d3eadb85ae47668501a70dd1211e090'
7
- data.tar.gz: bcf7dfcf91d8093099733839d06b38b1cea25548617eebad4f88a01910d8f64d6e0db26de0de5ebe38977e1cfa2b64d3fed80f8bc693d5ec6071c8dc633f5bb0
6
+ metadata.gz: 16292e64ea5a965eb90b092e81e1daf38db6db4812275e7cbdbec12376c62ab536a9cd36d53dbc1cc20fbcdea8d3ea325d756c7c4f3d6c9fbf9b14d166851792
7
+ data.tar.gz: 28f90a054e75bb4ac6f9e38e06ed4f3de214c41c01e92e94b80f5f94aeca2642a496d8515fd7be17bbec5663500fe612da9641edd22e06acb7b4e819f35a972c
@@ -212,6 +212,30 @@ Then('a span named {string} has a parent named {string}') do |child_name, parent
212
212
  end
213
213
  end
214
214
 
215
+ Then('a span named {string} has the following properties:') do |span_name, table|
216
+ spans = spans_from_request_list(Maze::Server.list_for('traces'))
217
+ found_spans = spans.find_all { |span| span['name'].eql?(span_name) }
218
+ raise Test::Unit::AssertionFailedError.new "No spans were found with the name #{span_name}" if found_spans.empty?
219
+
220
+ expected_properties = table.hashes
221
+
222
+ match = false
223
+ found_spans.each do |span|
224
+ matches = expected_properties.map do |expected_property|
225
+ property = Maze::Helper.read_key_path(span, expected_property['property'])
226
+ expected_property['value'].eql?(property.to_s)
227
+ end
228
+ if matches.all? && !matches.empty?
229
+ match = true
230
+ break
231
+ end
232
+ end
233
+
234
+ unless match
235
+ raise Test::Unit::AssertionFailedError.new "No spans were found containing all of the given properties"
236
+ end
237
+ end
238
+
215
239
  def spans_from_request_list list
216
240
  return list.remaining
217
241
  .flat_map { |req| req[:body]['resourceSpans'] }
data/lib/maze/aws/sam.rb CHANGED
@@ -63,14 +63,16 @@ module Maze
63
63
  # @return [Hash]
64
64
  def parse(output)
65
65
  unless valid?(output)
66
- raise <<~ERROR
67
- Unable to parse Lambda output!
68
- The likely cause is:
66
+ message = <<-WARNING
67
+ The lambda function did not successfully complete.
68
+ This may be expected and a normal result of the text execution.
69
+ The listed cause is:
69
70
  > #{output.last.chomp}
70
71
 
71
72
  Full output:
72
73
  > #{output.map(&:chomp).join("\n > ")}
73
- ERROR
74
+ WARNING
75
+ $logger.warn message
74
76
  end
75
77
 
76
78
  # Attempt to parse the last line of output as this is where a JSON
data/lib/maze.rb CHANGED
@@ -7,7 +7,7 @@ require_relative 'maze/timers'
7
7
  # Glues the various parts of MazeRunner together that need to be accessed globally,
8
8
  # providing an alternative to the proliferation of global variables or singletons.
9
9
  module Maze
10
- VERSION = '9.8.0'
10
+ VERSION = '9.9.0'
11
11
 
12
12
  class << self
13
13
  attr_accessor :check, :driver, :internal_hooks, :mode, :start_time, :dynamic_retry, :public_address,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bugsnag-maze-runner
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.8.0
4
+ version: 9.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Kirkland
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-02 00:00:00.000000000 Z
11
+ date: 2024-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber