Skip to content

Commit

Permalink
Remove metric tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mullermp committed Aug 23, 2024
1 parent ae4a90b commit 573e34b
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 48 deletions.
14 changes: 0 additions & 14 deletions gems/aws-sdk-core/spec/aws/plugins/request_compression_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,6 @@ def expect_uncompressed_body(resp, body)
end

context 'request compression operation' do
it 'sets user-agent metric for the operation' do
resp = client.some_operation(body: uncompressed_body)
metric = Aws::Plugins::UserAgent::METRICS['GZIP_REQUEST_COMPRESSION']
expect(resp.context.http_request.headers['User-Agent'])
.to include("m/#{metric}")
end

it 'compresses the body and sets the content-encoding header' do
resp = client.some_operation(body: uncompressed_body)
expect(resp.context.http_request.headers['Content-Encoding']).to eq('gzip')
Expand Down Expand Up @@ -165,13 +158,6 @@ def expect_uncompressed_body(resp, body)
expect_uncompressed_body(resp, small_body)
end

it 'sets user-agent metric for a streaming operation' do
resp = client.operation_streaming(body: 'body')
metric = Aws::Plugins::UserAgent::METRICS['GZIP_REQUEST_COMPRESSION']
expect(resp.context.http_request.headers['User-Agent'])
.to include("m/#{metric}")
end

it 'compresses a large streaming body' do
large_body = StringIO.new('.' * 16_385)
client.stub_responses(:operation_streaming, -> (context) do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,6 @@ module Plugins
client = RetryErrorsSvc::Client.new(retry_mode: 'legacy', region: 'us-west-2')
expect(client.handlers.entries.map(&:handler_class)).to include(RetryErrors::LegacyHandler)
end

it 'sets user-agent metric' do
client = RetryErrorsSvc::Client.new(retry_mode: 'legacy', region: 'us-west-2')
stub_request(:post, client.config.endpoint)
resp = client.example_operation
metric = Aws::Plugins::UserAgent::METRICS['RETRY_MODE_LEGACY']
expect(resp.context.http_request.headers['User-Agent'])
.to include("m/#{metric}")
end
end

describe RetryErrors::LegacyHandler do
Expand Down
18 changes: 0 additions & 18 deletions gems/aws-sdk-core/spec/aws/plugins/retry_errors_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,24 +106,6 @@ module Plugins
.to receive(:correct_clock_skew).and_return('true')
expect(client.config.correct_clock_skew).to eq(true)
end

it 'sets user-agent metric for standard' do
client = RetryErrorsSvc::Client.new(retry_mode: 'standard', region: 'us-west-2')
stub_request(:post, client.config.endpoint)
resp = client.example_operation
metric = Aws::Plugins::UserAgent::METRICS['RETRY_MODE_STANDARD']
expect(resp.context.http_request.headers['User-Agent'])
.to include("m/#{metric}")
end

it 'sets user-agent metric for adaptive' do
client = RetryErrorsSvc::Client.new(retry_mode: 'adaptive', region: 'us-west-2')
stub_request(:post, client.config.endpoint)
resp = client.example_operation
metric = Aws::Plugins::UserAgent::METRICS['RETRY_MODE_ADAPTIVE']
expect(resp.context.http_request.headers['User-Agent'])
.to include("m/#{metric}")
end
end

describe RetryErrors::Handler do
Expand Down
7 changes: 0 additions & 7 deletions gems/aws-sdk-s3/spec/plugins/express_session_auth_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,6 @@ module S3
end
client.get_object(bucket: bucket, key: 'key')
end

it 'sets user-agent metric' do
resp = client.get_object(bucket: 'bucket--use1-az2--x-s3', key: 'key')
metric = Aws::Plugins::UserAgent::METRICS['S3_EXPRESS_BUCKET']
expect(resp.context.http_request.headers['User-Agent'])
.to include("m/#{metric}")
end
end

# does not have http checksum trait, but requires a checksum (md5)
Expand Down

0 comments on commit 573e34b

Please sign in to comment.