Skip to content

Commit

Permalink
unit test for the ssl options.
Browse files Browse the repository at this point in the history
  • Loading branch information
andyliuliming authored and vinjiang committed Oct 10, 2018
1 parent 60d5bfa commit be05226
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/unit/config/client_test.rb
Expand Up @@ -56,6 +56,17 @@
storage_dns_suffix: "mocksuffix.com"
}

@ssl_version = :TLSv1_2
@ssl_min_version = :TLSv1_2
@ssl_max_version = :TLSv1_2
@account_key_options_with_ssl_version = {
storage_account_name: @account_name,
storage_access_key: @access_key,
ssl_version: @ssl_version,
ssl_min_version: @ssl_min_version,
ssl_max_version: @ssl_max_version
}

@removed = clear_storage_envs
end

Expand Down Expand Up @@ -255,6 +266,15 @@

end

describe "when create with ssl options" do
it "should set the ssl option correctly" do
client1 = Azure::Storage::Common::Client.new(@account_key_options_with_ssl_version)
client1.ssl_version.must_equal(@ssl_version)
client1.ssl_min_version.must_equal(@ssl_min_version)
client1.ssl_max_version.must_equal(@ssl_max_version)
end
end

after do
restore_storage_envs(@removed)
end
Expand Down

0 comments on commit be05226

Please sign in to comment.