-
Notifications
You must be signed in to change notification settings - Fork 96
/
Copy pathaws_sdk_test.rb
35 lines (30 loc) · 932 Bytes
/
aws_sdk_test.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
require_relative "test_helper"
Aws.config.update(
region: "us-east-1",
credentials: Aws::Credentials.new("akid", "secret"),
retry_limit: 0
)
class AwsSdkTest < Minitest::Test
def test_connect
Aws.config.update(endpoint: connect_url, http_open_timeout: 1)
assert_timeout(Seahorse::Client::NetworkingError) do
Aws::S3::Client.new.list_buckets
end
end
def test_read
Aws.config.update(endpoint: read_url, http_read_timeout: 1)
assert_timeout(Seahorse::Client::NetworkingError) do
Aws::S3::Client.new.list_buckets
end
end
def test_connect_client
assert_timeout(Seahorse::Client::NetworkingError) do
Aws::S3::Client.new(endpoint: connect_url, http_open_timeout: 1).list_buckets
end
end
def test_read_client
assert_timeout(Seahorse::Client::NetworkingError) do
Aws::S3::Client.new(endpoint: read_url, http_read_timeout: 1).list_buckets
end
end
end