test: test_env: make_db_config: set cfg host_id

So we can safely use `me` sstables in sstable_directory_test
that validates the sstable host owner.

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
This commit is contained in:
Benny Halevy
2023-03-16 15:06:05 +02:00
parent 8b168869be
commit df5347fca8
2 changed files with 2 additions and 1 deletions

View File

@@ -97,7 +97,7 @@ make_sstable_for_all_shards(replica::database& db, replica::table& table, fs::pa
sstables::shared_sstable new_sstable(sstables::test_env& env, fs::path dir, int64_t gen) {
return env.manager().make_sstable(test_table_schema(), dir.native(), generation_from_value(gen),
sstables::sstable_version_types::mc, sstables::sstable_format_types::big,
sstables::get_highest_sstable_version(), sstables::sstable_format_types::big,
gc_clock::now(), default_io_error_handler_gen(), default_sstable_buffer_size);
}

View File

@@ -144,6 +144,7 @@ namespace sstables {
std::unique_ptr<db::config> make_db_config(sstring temp_dir) {
auto cfg = std::make_unique<db::config>();
cfg->data_file_directories.set({ temp_dir });
cfg->host_id = locator::host_id::create_random_id();
return cfg;
}