tests/src/integration/tests/test_auth.cpp
/**
 * Perform plain text authentication session connections for all protocol
 * versions using NULL username credentials
 *
 * This test will perform a plain text authentication using each protocol
 * version with NULL username credentials and fail to establish a session
 * connection against a single node cluster.
 *
 * @test_category authentication
 * @since core:1.0.0
 * @expected_result Session will not be established for all protocol versions
 */
Perform plain text authentication session connections for all protocol
versions using NULL username credentials

This test will perform a plain text authentication using each protocol
version with NULL username credentials and fail to establish a session
connection against a single node cluster.

@test_category authentication
@since core:1.0.0
@expected_result Session will not be established for all protocol versions
Perform plain text authentication session connections for all protocol versions using NULL username credentials This test will perform a plain text authentication using each protocol version with NULL username credentials and fail to establish a session connection against a single node cluster . @test_category authentication @since core : 1 . 0 . 0 @expected_result Session will not be established for all protocol versions
CASSANDRA_INTEGRATION_TEST_F(AuthenticationTests, InvalidNullUsernameCredentials) {
  CHECK_FAILURE;
  logger_.add_critera("Key may not be empty");
  logger_.add_critera("Authentication ID must not be null");
  for (int i = CASS_LOWEST_SUPPORTED_PROTOCOL_VERSION; i <= CASS_HIGHEST_SUPPORTED_PROTOCOL_VERSION;
       ++i) {
    Session session = connect_using_credentials(i, NULL, "pass");
    ASSERT_EQ(session.connect_error_code(), CASS_ERROR_SERVER_BAD_CREDENTIALS);
    ASSERT_GT(logger_.count(), 0u);
    logger_.reset_count();
  }
}
CASSANDRA_INTEGRATION_TEST_F ( AuthenticationTests , InvalidNullUsernameCredentials ) { CHECK_FAILURE ; logger_ . add_critera ( " " ) ; logger_ . add_critera ( " " ) ; for ( int i = CASS_LOWEST_SUPPORTED_PROTOCOL_VERSION ; i <= CASS_HIGHEST_SUPPORTED_PROTOCOL_VERSION ; ++ i ) { Session session = connect_using_credentials ( i , NULL , " " ) ; ASSERT_EQ ( session . connect_error_code ( ) , CASS_ERROR_SERVER_BAD_CREDENTIALS ) ; ASSERT_GT ( logger_ . count ( ) , 0u ) ; logger_ . reset_count ( ) ; } }
Perform plain text authentication session connections for all protocol
 versions using NULL username credentials
Perform plain text authentication session connections for all protocol versions using NULL username credentials
// Iterate over all known/supported protocol versions /*
     * This is a case that could be guarded in the API entry point, or error out
     * in connection. However, auth is subject to major changes and this is just
     * a simple form. This test serves to characterize what is there presently.
     */