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

feat: replace hardcoded temp directory paths #974

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cswpy
Copy link

@cswpy cswpy commented Aug 31, 2024

Please briefly answer these questions:

  • what problem are you trying to solve? (or if there's no problem, what's the motivation for this change?)
    Fixes [feature]: replace hardcoding "/tmp/xxx" path #933
  • what changes does this pull request make?
    This PR replaces the hardcoded tmp path with calls to tempfile crate
  • are there any non-obvious implications of these changes? (does it break compatibility with previous versions, etc)

@cswpy
Copy link
Author

cswpy commented Aug 31, 2024

I replaced all the hardcoded paths under /engine, just wanna make sure this looks right before proceeding to replace the other references.

@bsbds
Copy link
Collaborator

bsbds commented Sep 2, 2024

Hi, please update the PR to resolve CI issues.

Signed-off-by: Pengyu Wang <hncswpy@gmail.com>
@@ -35,3 +35,4 @@ workspace-hack = { version = "0.1", path = "../../workspace-hack" }

[dev-dependencies]
test-macros = { path = "../test-macros" }
tempfile = "3"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add a new line at the end.

@@ -756,7 +757,7 @@ mod test {
};
let res = engine.apply_snapshot(fake_snapshot, &["not_exist"]).await;
assert!(res.is_err());
fs::remove_dir_all(dir).unwrap();
dir.close().unwrap();
}

#[test]
Copy link
Collaborator

Choose a reason for hiding this comment

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

The test_engine_size test also needs to be updated for consistency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature]: replace hardcoding "/tmp/xxx" path
2 participants