Skip to content

Commit

Permalink
add validation test for wsl plugin and new hive
Browse files Browse the repository at this point in the history
  • Loading branch information
ZarKyo committed Nov 29, 2024
1 parent 9de6790 commit 245d5a7
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
1 change: 0 additions & 1 deletion regipy/plugins/ntuser/wsl.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import logging
import json

from regipy.exceptions import RegistryKeyNotFoundException
from regipy.hive_types import NTUSER_HIVE_TYPE
Expand Down
Binary file added regipy_tests/data/NTUSER-WSL.DAT.xz
Binary file not shown.
30 changes: 28 additions & 2 deletions regipy_tests/validation/validation_tests/wsl_plugin_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,31 @@

class WSLPluginValidationCase(ValidationCase):
plugin = WSLPlugin
test_hive_file_name = ""
exact_expected_result = {}
test_hive_file_name = "NTUSER-WSL.DAT.xz"
exact_expected_result = {
"\\Software\\Microsoft\\Windows\\CurrentVersion\\Lxss": {
"last_modified": "2024-11-26T23:13:44.535966+00:00",
"number_of_distrib": 4,
"default_distrib_GUID": "{e3986a51-3357-4c37-8a3e-1a83d995a3da}",
"wsl_version": "WSL2",
"nat_ip_address": None,
"distributions": [
{
"GUID": "{e3986a51-3357-4c37-8a3e-1a83d995a3da}",
"last_modified": "2024-11-26T23:06:39.553058+00:00",
"wsl_distribution_source_location": "C:\\Users\\admin\\AppData\\Local\\Packages\\CanonicalGroupLimited.Ubuntu20.04onWindows_79rhkp1fndgsc\\LocalState",
"default_uid": 0,
"distribution_name": "Ubuntu-20.04",
"default_environment": None,
"flags": 7,
"kernel_command_line": None,
"package_family_name": "CanonicalGroupLimited.Ubuntu20.04onWindows_79rhkp1fndgsc",
"state": "Normal",
"filesystem": "wslfs",
"enable_interop": True,
"append_nt_path": True,
"enable_drive_mounting": True,
}
],
}
}

0 comments on commit 245d5a7

Please sign in to comment.