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

This test will perform a plain text authentication using each protocol
version and establish a session connection against a single node cluster.

@test_category authentication
@since core:1.0.0
@expected_result Session will be established for all protocol versions
Perform plain text authentication session connections for all protocol versions This test will perform a plain text authentication using each protocol version and establish a session connection against a single node cluster . @test_category authentication @since core : 1 . 0 . 0 @expected_result Session will be established for all protocol versions
CASSANDRA_INTEGRATION_TEST_F(AuthenticationTests, ProtocolVersions) {
  CHECK_FAILURE;
  for (int i = CASS_LOWEST_SUPPORTED_PROTOCOL_VERSION; i <= CASS_HIGHEST_SUPPORTED_PROTOCOL_VERSION;
       ++i) {
    Session session = connect_using_credentials(i, "cassandra", "cassandra");
    ASSERT_EQ(CASS_OK, session.connect_error_code()) << session.connect_error_description();
    Result result = session.execute("SELECT * FROM " + system_schema_keyspaces_);
    ASSERT_EQ(CASS_OK, result.error_code());
    ASSERT_GT(result.row_count(), 0u);
  }
}
CASSANDRA_INTEGRATION_TEST_F ( AuthenticationTests , ProtocolVersions ) { CHECK_FAILURE ; for ( int i = CASS_LOWEST_SUPPORTED_PROTOCOL_VERSION ; i <= CASS_HIGHEST_SUPPORTED_PROTOCOL_VERSION ; ++ i ) { Session session = connect_using_credentials ( i , " " , " " ) ; ASSERT_EQ ( CASS_OK , session . connect_error_code ( ) ) << session . connect_error_description ( ) ; Result result = session . execute ( " " + system_schema_keyspaces_ ) ; ASSERT_EQ ( CASS_OK , result . error_code ( ) ) ; ASSERT_GT ( result . row_count ( ) , 0u ) ; } }
Perform plain text authentication session connections for all protocol
 versions
Perform plain text authentication session connections for all protocol versions
// Iterate over all known/supported protocol versions // Establish a connection using the protocol version // Execute a query against the schema keyspaces table