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

Fix most tests for windows computers #467

Merged
merged 8 commits into from
Dec 6, 2023
Merged

Fix most tests for windows computers #467

merged 8 commits into from
Dec 6, 2023

Conversation

Miauwkeru
Copy link
Contributor

  • Check whether effective_ids is enabled for the system
  • Use type consistently
  • Open files as UTF-8 by default
  • Fix paths in test_target.py
  • Change all occurrences to flow.record path to self.target.fs.path
  • Fix issues regarding the resolver in trusteddocs

@Miauwkeru Miauwkeru requested a review from pyrco December 1, 2023 15:21
Copy link

codecov bot commented Dec 1, 2023

Codecov Report

Attention: 26 lines in your changes are missing coverage. Please review.

Comparison is base (6f775ad) 73.88% compared to head (ea0f030) 73.94%.
Report is 1 commits behind head on main.

Files Patch % Lines
...ssect/target/plugins/filesystem/unix/capability.py 84.90% 8 Missing ⚠️
dissect/target/plugins/filesystem/yara.py 69.23% 4 Missing ⚠️
dissect/target/filesystems/btrfs.py 0.00% 2 Missing ⚠️
dissect/target/plugins/os/windows/prefetch.py 33.33% 2 Missing ⚠️
dissect/target/plugins/os/windows/services.py 0.00% 2 Missing ⚠️
dissect/target/plugins/os/windows/startupinfo.py 0.00% 2 Missing ⚠️
dissect/target/filesystem.py 0.00% 1 Missing ⚠️
dissect/target/helpers/cache.py 50.00% 1 Missing ⚠️
dissect/target/plugins/filesystem/walkfs.py 94.44% 1 Missing ⚠️
dissect/target/plugins/os/windows/generic.py 0.00% 1 Missing ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #467      +/-   ##
==========================================
+ Coverage   73.88%   73.94%   +0.06%     
==========================================
  Files         259      259              
  Lines       20901    20878      -23     
==========================================
- Hits        15442    15439       -3     
+ Misses       5459     5439      -20     
Flag Coverage Δ
unittests 73.94% <78.68%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

Choose a reason for hiding this comment

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

Accidentally added or intentional addition? Missing a __init__.py if the latter case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, it was an accident on my part that I added the nixos/_os.py in this pr... I will take it with me to a future iteration

@@ -73,7 +73,7 @@ def trusteddocs(self) -> Iterator[TrustedDocumentsRecord]:
ts=key.ts,
type=value.type,
application=application,
document_path=self.target.resolve(value.name),
document_path=self.target.fs.path(self.target.resolve(value.name)),
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps .resolve() should return a path?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That might be a good idea for the future yes.

@Miauwkeru Miauwkeru requested review from Poeloe and removed request for pyrco December 4, 2023 09:07
Copy link
Contributor

@Poeloe Poeloe left a comment

Choose a reason for hiding this comment

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

LGTM

@Miauwkeru Miauwkeru dismissed Schamper’s stale review December 6, 2023 08:47

Made the ticket and resolved the review comments

@Miauwkeru Miauwkeru merged commit 8674c31 into main Dec 6, 2023
@Miauwkeru Miauwkeru deleted the fix-windows-tests branch December 6, 2023 08:48
JSCU-CNI pushed a commit to JSCU-CNI/dissect.target that referenced this pull request Jan 2, 2024
* Check whether effective_ids is enabled for the system
* Use __type__ consistently
* Open files as UTF-8 by default
* Fix paths in test_target.py
* Change all occurrences to flow.record path to self.target.fs.path
* Fix issues regarding the resolver in trusteddocs
Poeloe pushed a commit that referenced this pull request Feb 29, 2024
* Check whether effective_ids is enabled for the system
* Use __type__ consistently
* Open files as UTF-8 by default
* Fix paths in test_target.py
* Change all occurrences to flow.record path to self.target.fs.path
* Fix issues regarding the resolver in trusteddocs
Zawadidone pushed a commit to Zawadidone/dissect.target that referenced this pull request Apr 5, 2024
* Check whether effective_ids is enabled for the system
* Use __type__ consistently
* Open files as UTF-8 by default
* Fix paths in test_target.py
* Change all occurrences to flow.record path to self.target.fs.path
* Fix issues regarding the resolver in trusteddocs
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