mirror of
https://github.com/XRPLF/clio.git
synced 2026-06-04 01:06:45 +00:00
test: Fix integration tests (#3072)
Fix 2 issues in integration tests: - `127.0.0.2` is forwarded to localhost on macos - Keyspace is always dropped in test's destructor but it may not exist
This commit is contained in:
@@ -81,7 +81,7 @@ public:
|
||||
// drop the keyspace for next test
|
||||
data::cassandra::Handle const handle{TestGlobals::instance().backendHost};
|
||||
EXPECT_TRUE(handle.connect());
|
||||
EXPECT_TRUE(handle.execute("DROP KEYSPACE " + std::string{kKEYSPACE}));
|
||||
EXPECT_TRUE(handle.execute("DROP KEYSPACE IF EXISTS " + std::string{kKEYSPACE}));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -98,7 +98,7 @@ TEST_F(BackendCassandraFactoryTest, CreateCassandraBackendDBDisconnect)
|
||||
{"database": {
|
||||
"type": "cassandra",
|
||||
"cassandra": {
|
||||
"contact_points": "127.0.0.2"
|
||||
"contact_points": "128.0.2.1"
|
||||
}
|
||||
}}
|
||||
)JSON");
|
||||
|
||||
@@ -111,7 +111,7 @@ TEST_F(BackendCassandraBaseTest, ConnectionFailTimeout)
|
||||
Settings settings;
|
||||
settings.connectionTimeout = std::chrono::milliseconds{30};
|
||||
settings.connectionInfo =
|
||||
Settings::ContactPoints{.contactPoints = "127.0.0.2", .port = std::nullopt};
|
||||
Settings::ContactPoints{.contactPoints = "128.0.2.1", .port = std::nullopt};
|
||||
|
||||
Handle const handle{settings};
|
||||
auto const f = handle.asyncConnect();
|
||||
|
||||
Reference in New Issue
Block a user