Skip to content

Commit

Permalink
serverless: additional Ruby v3.2+ constraints
Browse files Browse the repository at this point in the history
skip unless Ruby v3.2+ (minimum available AWS Lambda runtime)
  • Loading branch information
fallwith committed Aug 14, 2024
1 parent af5a204 commit c115011
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/new_relic/agent/serverless_handler_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ def test_support_for_payload_format_v1
end

def test_distributed_tracing_for_api_gateway_v1
skip 'This serverless test is limited to Ruby v3.2+' unless ruby_version_float >= 3.2

event = {'version' => '1.0',
'httpMethod' => 'POST',
'headers' => {NewRelic::NEWRELIC_KEY => {
Expand All @@ -214,6 +216,8 @@ def test_distributed_tracing_for_api_gateway_v1
end

def test_distributed_tracing_for_api_gateway_v2
skip 'This serverless test is limited to Ruby v3.2+' unless ruby_version_float >= 3.2

event = {'version' => '2.0',
'httpMethod' => 'POST',
'requestContext' => {'http' => {NewRelic::NEWRELIC_KEY => {
Expand All @@ -224,6 +228,8 @@ def test_distributed_tracing_for_api_gateway_v2
end

def test_reports_web_attributes_for_api_gateway_v1
skip 'This serverless test is limited to Ruby v3.2+' unless ruby_version_float >= 3.2

event = {'version' => '1.0',
'resource' => '/RG35XXSP',
'path' => '/default/RG35XXSP',
Expand All @@ -246,6 +252,8 @@ def test_reports_web_attributes_for_api_gateway_v1
end

def test_reports_web_attributes_for_api_gateway_v2
skip 'This serverless test is limited to Ruby v3.2+' unless ruby_version_float >= 3.2

event = {'version' => '2.0',
'headers' => {'X-Forwarded-Port' => 443},
'queryStringParameters' => {'param1': 'value1', 'param2': 'value2'},
Expand Down

0 comments on commit c115011

Please sign in to comment.