Skip to content
This repository was archived by the owner on Aug 16, 2025. It is now read-only.

Commit c40cdb5

Browse files
committed
0.1.5
QA: - Added tests for show-by-property
1 parent 546f170 commit c40cdb5

File tree

2 files changed

+157
-0
lines changed

2 files changed

+157
-0
lines changed
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
{
2+
"jetbrains_java_error_heap_dump": {
3+
"application": "JetBrains",
4+
"category": "IDE",
5+
"entity_category": "crash log",
6+
"description": "Java error heap dump of JetBrains tools. Can be several gigabytes.",
7+
"delete" : {
8+
"type": "file",
9+
"location": "~/java_error_in_*.hprof"
10+
},
11+
"active": true
12+
},
13+
"jetbrains_java_error_logs": {
14+
"application": "JetBrains",
15+
"category": "IDE",
16+
"entity_category": "crash log",
17+
"description": "Java error logs for various JetBrains tools.",
18+
"delete": {
19+
"type": "file",
20+
"location": "~/java_error_in_*.log"
21+
},
22+
"active": true
23+
},
24+
"gradio_temporary_files": {
25+
"application": "Gradio",
26+
"category": "AI",
27+
"entity_category": "temporary files",
28+
"description": "User temporary files for Gradio UI. Gradio is a Python UI library used by many AI applications.",
29+
"delete": {
30+
"type": "directory",
31+
"location": "~/AppData/Local/Temp/gradio"
32+
},
33+
"active": true
34+
},
35+
"wslg_rd_client_auto_trace": {
36+
"application": "WSL",
37+
"category": "Windows",
38+
"entity_category": "log",
39+
"description": "WSLg (Windows Subsystem for Linux GUI) remote desktop client auto trace logs. Can be generated when using Docker. Can be dozens of gigabytes.",
40+
"delete": {
41+
"type": "file",
42+
"location": "~/AppData/Local/Temp/DiagOutputDir/RdClientAutoTrace-*.etl"
43+
},
44+
"active": true
45+
},
46+
"viber_update_temporary_installation": {
47+
"application": "Viber",
48+
"category": "communication",
49+
"entity_category": "temporary files",
50+
"description": "Viber updater zipped installation.",
51+
"delete": {
52+
"type": "file",
53+
"location": "~/AppData/Local/Temp/update.zip"
54+
},
55+
"active": true
56+
},
57+
"delphi_linecse_server_log": {
58+
"application": "Delphi",
59+
"category": "IDE",
60+
"entity_category": "log",
61+
"description": "Delphi IDE licensing server logs. Contains sensitive information, like Serial Number and Registration Key in plain text.",
62+
"delete": {
63+
"type": "file",
64+
"location": "~/sanct.log"
65+
},
66+
"active": true
67+
},
68+
"delphi_license_server_log_2": {
69+
"application": "Delphi",
70+
"category": "IDE",
71+
"entity_category": "log",
72+
"description": "Delphi licensing server logs. Contains information on Delphi and Licensing Service locations.",
73+
"delete": {
74+
"type": "file",
75+
"location": "~/regwizard.log"
76+
},
77+
"active": true
78+
},
79+
"windows_user_mode_dumps": {
80+
"application": "Windows",
81+
"category": "Windows",
82+
"entity_category": "crash log",
83+
"description": "Windows User-Mode application crash dump logs.",
84+
"delete": {
85+
"type": "file",
86+
"location": "~/AppData/Local/CrashDumps/*.dmp"
87+
},
88+
"active": true
89+
},
90+
"dotnet_telemetry_service": {
91+
"application": ".NET",
92+
"category": ".NET",
93+
"entity_category": "telemetry",
94+
"description": ".NET Core Telemetry data",
95+
"delete": {
96+
"type": "directory",
97+
"location": "~/.dotnet/TelemetryStorageService"
98+
},
99+
"active": true
100+
},
101+
"scoop_cache": {
102+
"application": "Scoop",
103+
"category": "installer",
104+
"entity_category": "cache",
105+
"description": "Scoop.sh installer cache. Contains packaged versions of all previously installed or updated applications.",
106+
"delete": {
107+
"type": "file",
108+
"location": "~/scoop/cache/*.*"
109+
},
110+
"active": true
111+
}
112+
}

tests/show-by-property.Tests.ps1

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
Describe 'Show-Applications' {
2+
BeforeAll {
3+
. $PSScriptRoot/../src/show-by-property.ps1
4+
}
5+
6+
It 'Should display a list of all applications' {
7+
$expected = New-Object System.Collections.Generic.List[object]
8+
$expected.AddRange(@("JetBrains", "Gradio", "WSL", "Viber", "Delphi", "Windows", ".NET", "Scoop"))
9+
10+
$result = Show-Applications -cleanupListFile $PSScriptRoot/cleanup-list.tests-sample.json
11+
$result | Should -BeExactly $expected
12+
}
13+
14+
It 'Should display a list of all categories' {
15+
$expected = New-Object System.Collections.Generic.List[object]
16+
$expected.AddRange(@("IDE", "AI", "Windows", "communication", ".NET", "installer"))
17+
18+
$result = Show-Categories -cleanupListFile $PSScriptRoot/cleanup-list.tests-sample.json
19+
$result | Should -BeExactly $expected
20+
}
21+
22+
It 'Should display a list of all entity categories' {
23+
$expected = New-Object System.Collections.Generic.List[object]
24+
$expected.AddRange(@("crash log", "temporary files", "log", "telemetry", "cache"))
25+
26+
$result = Show-EntityCategories -cleanupListFile $PSScriptRoot/cleanup-list.tests-sample.json
27+
$result | Should -BeExactly $expected
28+
}
29+
30+
It 'Should display a list of all types' {
31+
$expected = New-Object System.Collections.Generic.List[object]
32+
$expected.AddRange(@("file", "directory"))
33+
34+
$result = Show-Types -cleanupListFile $PSScriptRoot/cleanup-list.tests-sample.json
35+
$result | Should -BeExactly $expected
36+
}
37+
38+
It 'Should display a list of all custom categories' {
39+
$expected = New-Object System.Collections.Generic.List[object]
40+
$expected.AddRange(@())
41+
42+
$result = Show-CustomCategories -cleanupListFile $PSScriptRoot/cleanup-list.tests-sample.json
43+
$result | Should -BeExactly $expected
44+
}
45+
}

0 commit comments

Comments
 (0)