Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

store: add path field to StoreConfig #6938

Merged
merged 7 commits into from
Jun 3, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fmt
  • Loading branch information
mina86 committed Jun 1, 2022
commit e9435c324f2d54339493334ca0d317b05e547cb9
2 changes: 1 addition & 1 deletion core/store/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ impl<'a> StoreOpener<'a> {
pub fn get_path(&self) -> std::path::PathBuf {
let path = match self.config.path {
Some(ref path) => path,
None => std::path::Path::new(STORE_PATH)
None => std::path::Path::new(STORE_PATH),
};
self.home.map(|home| home.join(path)).unwrap_or_else(|| path.to_owned())
}
Expand Down
13 changes: 10 additions & 3 deletions pytest/tests/sanity/spin_up_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,16 @@ def test_sanity_spin_up():
This is just a sanity check that the neard binary isn’t borked too much.
See <https://github.com/near/nearcore/issues/4993>.
"""
nodes = cluster.start_cluster(2, 0, 1, None, [], client_config_changes={
1: {'store': {'path': 'atad'}}
})
nodes = cluster.start_cluster(
2,
0,
1,
None, [],
client_config_changes={1: {
'store': {
'path': 'atad'
}
}})
utils.wait_for_blocks(nodes[0], target=4)
# Verify that second node created RocskDB in ‘atad’ directory rather than
# ‘data’.
Expand Down