Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for Riak security for HTTP and PB endpoints #385

Merged
merged 10 commits into from
Oct 1, 2013
Merged

Conversation

Vagabond
Copy link
Contributor

Tests don't cover the complete API, but they are the most comprehensive erlang client tests we have. I'm hoping the other client libraries can more completely cover the Riak API with security enabled, because I'm sick of writing client tests ;)

These tests should run against all backends

See also basho/riak#355.

Nodes = rt:build_cluster(4, Conf),
Node = hd(Nodes),

{ok, [{"127.0.0.1", Port}]} = rpc:call(Node, application, get_env,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably use rt:connection_info()

@seancribbs
Copy link

Do I have to generate certs/etc for these tests? When running them I get:

14:42:24.412 [error] SSL: certify: ssl_handshake.erl:1155:Fatal error: unknown ca

@Vagabond
Copy link
Contributor Author

The test intentionally tries invalid CAs, those should not cause the test to fail...

@seancribbs
Copy link

My notes from getting these tests to run:

  1. R16 introduced an additional wrapper around the <<"unknown ca">> error message, so it appears like {tls_alert, <<"unknown ca">>}. This should be fixed in the test (requiring R16+), or wrapped in a macro with some version-switching.
  2. I had to manually apply Retry requests when the worker has the connection close cmullaparthi/ibrowse#100 to ibrowse in order to get the list-buckets step in the http test not to timeout.
  3. Some more logging in the progress of the test would help identify what is being tested and where specific errors or failures occur, but that's not required for these tests to pass.
  4. The counter tests fail as expected, I had to comment them out to complete the test.

@seancribbs
Copy link

👍 with the provisos listed (ibrowse patch, counters fail), works like a champ

Vagabond added a commit that referenced this pull request Oct 1, 2013
Add tests for Riak security for HTTP and PB endpoints
@Vagabond Vagabond merged commit df8c092 into master Oct 1, 2013
@hazen hazen deleted the adt-security branch May 8, 2015 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants