|
11 | 11 | ::Logger.new(string_io)
|
12 | 12 | end
|
13 | 13 |
|
14 |
| - context "with IPv6 addresses" do |
| 14 | + context "with tracing enabled" do |
15 | 15 | before do
|
16 | 16 | perform_basic_setup do |config|
|
17 | 17 | config.traces_sample_rate = 1.0
|
| 18 | + config.transport.transport_class = Sentry::HTTPTransport |
| 19 | + config.logger = logger |
| 20 | + # the dsn needs to have a real host so we can make a real connection before sending a failed request |
| 21 | + config.dsn = 'http://foobarbaz@o447951.ingest.sentry.io/5434472' |
18 | 22 | end
|
19 | 23 | end
|
20 | 24 |
|
21 |
| - it "correctly parses the short-hand IPv6 addresses" do |
22 |
| - stub_normal_response |
23 |
| - |
24 |
| - transaction = Sentry.start_transaction |
25 |
| - Sentry.get_current_scope.set_span(transaction) |
| 25 | + context "with IPv6 addresses" do |
| 26 | + it "correctly parses the short-hand IPv6 addresses" do |
| 27 | + stub_normal_response |
26 | 28 |
|
27 |
| - _ = Net::HTTP.get("::1", "/path", 8080) |
| 29 | + transaction = Sentry.start_transaction |
| 30 | + Sentry.get_current_scope.set_span(transaction) |
28 | 31 |
|
29 |
| - expect(transaction.span_recorder.spans.count).to eq(2) |
| 32 | + _ = Net::HTTP.get("::1", "/path", 8080) |
30 | 33 |
|
31 |
| - request_span = transaction.span_recorder.spans.last |
32 |
| - expect(request_span.data).to eq( |
33 |
| - { "url" => "http://[::1]/path", "http.request.method" => "GET", "http.response.status_code" => 200 } |
34 |
| - ) |
35 |
| - end |
36 |
| - end |
| 34 | + expect(transaction.span_recorder.spans.count).to eq(2) |
37 | 35 |
|
38 |
| - context "with tracing enabled" do |
39 |
| - before do |
40 |
| - perform_basic_setup do |config| |
41 |
| - config.traces_sample_rate = 1.0 |
42 |
| - config.transport.transport_class = Sentry::HTTPTransport |
43 |
| - config.logger = logger |
44 |
| - # the dsn needs to have a real host so we can make a real connection before sending a failed request |
45 |
| - config.dsn = 'http://foobarbaz@o447951.ingest.sentry.io/5434472' |
| 36 | + request_span = transaction.span_recorder.spans.last |
| 37 | + expect(request_span.data).to eq( |
| 38 | + { "url" => "http://[::1]/path", "http.request.method" => "GET", "http.response.status_code" => 200 } |
| 39 | + ) |
46 | 40 | end
|
47 | 41 | end
|
48 | 42 |
|
|
0 commit comments