Skip to content

测试#267

Closed
xiaoj655 wants to merge 4 commits intoTencentBlueKing:masterfrom
xiaoj655:loong-test
Closed

测试#267
xiaoj655 wants to merge 4 commits intoTencentBlueKing:masterfrom
xiaoj655:loong-test

Conversation

@xiaoj655
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings April 21, 2026 08:45
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the storage test helper fixture to create temporary files safely, replacing use of tempfile.mktemp() with NamedTemporaryFile while keeping the same Path-based interface for tests.

Changes:

  • Replace tempfile.mktemp() usage with NamedTemporaryFile(delete=False) to avoid insecure temp-path generation.
  • Adjust mktemp fixture logic to always create a real file (optionally pre-populated with provided content) and continue cleaning up created files after the test.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +30 to +34
with NamedTemporaryFile(mode="w", delete=False) as fh:
fh.write(content)
filepath = Path(fh.name)
else:
with NamedTemporaryFile(delete=False) as fh:
@xiaoj655 xiaoj655 closed this Apr 22, 2026
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.

3 participants