chore: No ALL_CAPS (#1760)

Fixes #1680
This commit is contained in:
Alex Kremer
2025-01-02 11:39:31 +00:00
committed by GitHub
parent efe5d08205
commit 820b32c6d7
361 changed files with 10061 additions and 9724 deletions

View File

@@ -46,7 +46,7 @@ struct MigrationManagerBaseTest : public util::prometheus::WithMockPrometheus, p
util::config::ClioConfigDefinition cfg{
{"migration.full_scan_threads",
util::config::ConfigValue{util::config::ConfigType::Integer}.defaultValue(2).withConstraint(
util::config::validateUint32
util::config::gValidateUint32
)}
};
std::shared_ptr<TestCassandraMigrationManager> migrationManager;

View File

@@ -39,18 +39,18 @@
using EmptyMigratorRegister = migration::impl::MigratorsRegister<MockMigrationBackend>;
namespace {
util::config::ClioConfigDefinition cfg{
util::config::ClioConfigDefinition gCfg{
{{"migration.full_scan_threads",
util::config::ConfigValue{util::config::ConfigType::Integer}.defaultValue(2).withConstraint(
util::config::validateUint32
util::config::gValidateUint32
)},
{"migration.full_scan_jobs",
util::config::ConfigValue{util::config::ConfigType::Integer}.defaultValue(4).withConstraint(
util::config::validateUint32
util::config::gValidateUint32
)},
{"migration.cursors_per_job",
util::config::ConfigValue{util::config::ConfigType::Integer}.defaultValue(100).withConstraint(
util::config::validateUint32
util::config::gValidateUint32
)}}
};
} // namespace
@@ -63,7 +63,7 @@ TEST_F(MigratorRegisterTests, EmptyMigratorRegister)
EXPECT_EQ(migratorRegister.getMigratorsStatus().size(), 0);
EXPECT_EQ(migratorRegister.getMigratorNames().size(), 0);
EXPECT_EQ(migratorRegister.getMigratorStatus("unknown"), migration::MigratorStatus::NotKnown);
EXPECT_NO_THROW(migratorRegister.runMigrator("unknown", cfg.getObject("migration")));
EXPECT_NO_THROW(migratorRegister.runMigrator("unknown", gCfg.getObject("migration")));
EXPECT_EQ(migratorRegister.getMigratorDescription("unknown"), "No Description");
}
@@ -173,11 +173,11 @@ TEST_F(MultipleMigratorRegisterTests, Description)
TEST_F(MultipleMigratorRegisterTests, RunUnknownMigrator)
{
EXPECT_CALL(*backend_, writeMigratorStatus(testing::_, testing::_)).Times(0);
EXPECT_NO_THROW(migratorRegister->runMigrator("unknown", cfg.getObject("migration")));
EXPECT_NO_THROW(migratorRegister->runMigrator("unknown", gCfg.getObject("migration")));
}
TEST_F(MultipleMigratorRegisterTests, MigrateNormalMigrator)
{
EXPECT_CALL(*backend_, writeMigratorStatus("SimpleTestMigrator", "Migrated")).Times(1);
EXPECT_NO_THROW(migratorRegister->runMigrator("SimpleTestMigrator", cfg.getObject("migration")));
EXPECT_NO_THROW(migratorRegister->runMigrator("SimpleTestMigrator", gCfg.getObject("migration")));
}

View File

@@ -95,7 +95,7 @@ TEST_F(FullTableScannerTests, MultipleThreadCtx)
scanner.wait();
}
MATCHER(RangeMinMax, "Matches the range with min and max")
MATCHER(rangeMinMax, "Matches the range with min and max")
{
return (arg.start == std::numeric_limits<std::int64_t>::min()) &&
(arg.end == std::numeric_limits<std::int64_t>::max());
@@ -103,7 +103,7 @@ MATCHER(RangeMinMax, "Matches the range with min and max")
TEST_F(FullTableScannerTests, RangeSizeIsOne)
{
testing::MockFunction<void(migration::cassandra::impl::TokenRange const&, boost::asio::yield_context)> mockCallback;
EXPECT_CALL(mockCallback, Call(RangeMinMax(), testing::_)).Times(1);
EXPECT_CALL(mockCallback, Call(rangeMinMax(), testing::_)).Times(1);
auto scanner = migration::cassandra::impl::FullTableScanner<TestScannerAdaper>(
{.ctxThreadsNum = 2, .jobsNum = 1, .cursorsPerJob = 1}, TestScannerAdaper(mockCallback)
);

View File

@@ -29,8 +29,8 @@ class Empty {};
struct SimpleTestTable {
using Row = std::tuple<std::uint32_t, std::uint32_t>;
static constexpr char const* PARTITION_KEY = "key";
static constexpr char const* TABLE_NAME = "test";
static constexpr char const* kPARTITION_KEY = "key";
static constexpr char const* kTABLE_NAME = "test";
};
} // namespace
TEST(MigrationSpec, TableSpec)