GH-50828: [C++][FlightRPC][ODBC] Add SQLGetInfo remote tests (#50838)
### Rationale for this change
The SQLGetInfo tests for `SQL_CREATE_SCHEMA` and `SQL_CREATE_TABLE` only covered the mock server. The remote fixture can report different DDL capabilities, so the missing remote coverage allowed regressions to go unnoticed.
### What changes are included in this PR?
- Add a named remote connection-info fixture.
- Add remote tests for `SQL_CREATE_SCHEMA` and `SQL_CREATE_TABLE`.
- Keep the mock expectations (`1`) and assert the remote fixture's unsupported DDL values (`0`) separately.
Fixes #50828.
### Are these changes tested?
Yes
### Are there any user-facing changes?
No.
* GitHub Issue: #50828
Authored-by: erichanwang <ericwang559@gmail.com>
Signed-off-by: David Li <li.davidm96@gmail.com>
diff --git a/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc b/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc
index ff4abc5..aec6d8f 100644
--- a/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc
+++ b/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc
@@ -31,7 +31,7 @@
class ConnectionInfoMockTest : public FlightSQLODBCMockTestBase {};
class ConnectionInfoRemoteTest : public FlightSQLODBCRemoteTestBase {};
-using TestTypes = ::testing::Types<ConnectionInfoMockTest, FlightSQLODBCRemoteTestBase>;
+using TestTypes = ::testing::Types<ConnectionInfoMockTest, ConnectionInfoRemoteTest>;
TYPED_TEST_SUITE(ConnectionInfoTest, TestTypes);
template <typename T>
@@ -711,6 +711,20 @@
EXPECT_EQ(static_cast<SQLUINTEGER>(1), value);
}
+TEST_F(ConnectionInfoRemoteTest, TestSQLGetInfoCreateSchema) {
+ SQLUINTEGER value;
+ GetInfo(this->conn, SQL_CREATE_SCHEMA, &value);
+
+ EXPECT_EQ(static_cast<SQLUINTEGER>(0), value);
+}
+
+TEST_F(ConnectionInfoRemoteTest, TestSQLGetInfoCreateTable) {
+ SQLUINTEGER value;
+ GetInfo(this->conn, SQL_CREATE_TABLE, &value);
+
+ EXPECT_EQ(static_cast<SQLUINTEGER>(0), value);
+}
+
TYPED_TEST(ConnectionInfoTest, TestSQLGetInfoCreateTranslation) {
SQLUINTEGER value;
GetInfo(this->conn, SQL_CREATE_TRANSLATION, &value);