Skip to content

Commit

Permalink
chore: test db namespaces (#88)
Browse files Browse the repository at this point in the history
* chore: use different namespaces for different dbs during testing

* ci: run all tests in the workspace
  • Loading branch information
zeapoz authored Apr 16, 2024
1 parent 3df0707 commit 78bd07b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fmt --all --check,
check --all-targets --all-features,
clippy --all-targets --all-features -- -D warnings,
test --all-targets --all-features
test --all-targets --all-features --workspace
]
steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 3 additions & 1 deletion state-reconstruct-storage/src/reconstruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,11 @@ mod tests {

use super::*;

const TEST_DB_PATH: &str = "snapshot_test_db";

#[test]
fn basics() {
let db_dir = PathBuf::from("./test_inner_db");
let db_dir = PathBuf::from(TEST_DB_PATH);
{
let db = ReconstructionDatabase::new(db_dir.clone()).unwrap();
let zero = db.get_last_repeated_key_index().unwrap();
Expand Down
4 changes: 3 additions & 1 deletion state-reconstruct-storage/src/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,11 @@ mod tests {

use super::*;

const TEST_DB_PATH: &str = "reconstruction_test_db";

#[test]
fn basics() {
let db_dir = PathBuf::from("./test_inner_db");
let db_dir = PathBuf::from(TEST_DB_PATH);
{
let db = SnapshotDatabase::new(db_dir.clone()).unwrap();
let zero = db.get_last_repeated_key_index().unwrap();
Expand Down

1 comment on commit 78bd07b

@ajit2903
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0x06EE840642a33367ee59fCA237F270d5119d1356

Please sign in to comment.