@@ -47,19 +47,25 @@ suite('Attach to process - process provider', () => {
4747 label : 'launchd' ,
4848 description : '1' ,
4949 detail : 'launchd' ,
50- id : '1'
50+ id : '1' ,
51+ processName : 'launchd' ,
52+ commandLine : 'launchd'
5153 } ,
5254 {
5355 label : 'syslogd' ,
5456 description : '41' ,
5557 detail : 'syslogd' ,
56- id : '41'
58+ id : '41' ,
59+ processName : 'syslogd' ,
60+ commandLine : 'syslogd'
5761 } ,
5862 {
5963 label : 'kextd' ,
6064 description : '146' ,
6165 detail : 'kextd' ,
62- id : '146'
66+ id : '146' ,
67+ processName : 'kextd' ,
68+ commandLine : 'kextd'
6369 }
6470 ] ;
6571 when ( processService . exec ( PsProcessParser . psLinuxCommand . command , anything ( ) , anything ( ) ) ) . thenResolve ( { stdout : psOutput } ) ;
@@ -82,19 +88,25 @@ suite('Attach to process - process provider', () => {
8288 label : 'launchd' ,
8389 description : '1' ,
8490 detail : 'launchd' ,
85- id : '1'
91+ id : '1' ,
92+ processName : 'launchd' ,
93+ commandLine : 'launchd'
8694 } ,
8795 {
8896 label : 'syslogd' ,
8997 description : '41' ,
9098 detail : 'syslogd' ,
91- id : '41'
99+ id : '41' ,
100+ processName : 'syslogd' ,
101+ commandLine : 'syslogd'
92102 } ,
93103 {
94104 label : 'kextd' ,
95105 description : '146' ,
96106 detail : 'kextd' ,
97- id : '146'
107+ id : '146' ,
108+ processName : 'kextd' ,
109+ commandLine : 'kextd'
98110 }
99111 ] ;
100112 when ( processService . exec ( PsProcessParser . psDarwinCommand . command , anything ( ) , anything ( ) ) ) . thenResolve ( { stdout : psOutput } ) ;
@@ -125,19 +137,25 @@ ProcessId=5912\r
125137 label : 'System' ,
126138 description : '4' ,
127139 detail : '' ,
128- id : '4'
140+ id : '4' ,
141+ processName : 'System' ,
142+ commandLine : ''
129143 } ,
130144 {
131145 label : 'sihost.exe' ,
132146 description : '5728' ,
133147 detail : 'sihost.exe' ,
134- id : '5728'
148+ id : '5728' ,
149+ processName : 'sihost.exe' ,
150+ commandLine : 'sihost.exe'
135151 } ,
136152 {
137153 label : 'svchost.exe' ,
138154 description : '5912' ,
139155 detail : 'C:\\WINDOWS\\system32\\svchost.exe -k UnistackSvcGroup -s CDPUserSvc' ,
140- id : '5912'
156+ id : '5912' ,
157+ processName : 'svchost.exe' ,
158+ commandLine : 'C:\\WINDOWS\\system32\\svchost.exe -k UnistackSvcGroup -s CDPUserSvc'
141159 }
142160 ] ;
143161 when ( platformService . isMac ) . thenReturn ( false ) ;
@@ -162,6 +180,7 @@ ProcessId=5912\r
162180 await expect ( promise ) . to . eventually . be . rejectedWith ( `Operating system '${ OSType . Unknown } ' not supported.` ) ;
163181 } ) ;
164182
183+ // tslint:disable-next-line: max-func-body-length
165184 suite ( 'POSIX getAttachItems (Linux)' , ( ) => {
166185 setup ( ( ) => {
167186 when ( platformService . isMac ) . thenReturn ( false ) ;
@@ -179,19 +198,25 @@ ProcessId=5912\r
179198 label : 'kextd' ,
180199 description : '146' ,
181200 detail : 'kextd' ,
182- id : '146'
201+ id : '146' ,
202+ processName : 'kextd' ,
203+ commandLine : 'kextd'
183204 } ,
184205 {
185206 label : 'launchd' ,
186207 description : '1' ,
187208 detail : 'launchd' ,
188- id : '1'
209+ id : '1' ,
210+ processName : 'launchd' ,
211+ commandLine : 'launchd'
189212 } ,
190213 {
191214 label : 'syslogd' ,
192215 description : '41' ,
193216 detail : 'syslogd' ,
194- id : '41'
217+ id : '41' ,
218+ processName : 'syslogd' ,
219+ commandLine : 'syslogd'
195220 }
196221 ] ;
197222 when ( processService . exec ( PsProcessParser . psLinuxCommand . command , anything ( ) , anything ( ) ) ) . thenResolve ( { stdout : psOutput } ) ;
@@ -214,31 +239,41 @@ ProcessId=5912\r
214239 label : 'python' ,
215240 description : '96' ,
216241 detail : 'python' ,
217- id : '96'
242+ id : '96' ,
243+ processName : 'python' ,
244+ commandLine : 'python'
218245 } ,
219246 {
220247 label : 'python' ,
221248 description : '31896' ,
222249 detail : 'python script.py' ,
223- id : '31896'
250+ id : '31896' ,
251+ processName : 'python' ,
252+ commandLine : 'python script.py'
224253 } ,
225254 {
226255 label : 'kextd' ,
227256 description : '146' ,
228257 detail : 'kextd' ,
229- id : '146'
258+ id : '146' ,
259+ processName : 'kextd' ,
260+ commandLine : 'kextd'
230261 } ,
231262 {
232263 label : 'launchd' ,
233264 description : '1' ,
234265 detail : 'launchd' ,
235- id : '1'
266+ id : '1' ,
267+ processName : 'launchd' ,
268+ commandLine : 'launchd'
236269 } ,
237270 {
238271 label : 'syslogd' ,
239272 description : '41' ,
240273 detail : 'syslogd' ,
241- id : '41'
274+ id : '41' ,
275+ processName : 'syslogd' ,
276+ commandLine : 'syslogd'
242277 }
243278 ] ;
244279 when ( processService . exec ( PsProcessParser . psLinuxCommand . command , anything ( ) , anything ( ) ) ) . thenResolve ( { stdout : psOutput } ) ;
@@ -277,19 +312,25 @@ ProcessId=5728\r
277312 label : 'sihost.exe' ,
278313 description : '5728' ,
279314 detail : 'sihost.exe' ,
280- id : '5728'
315+ id : '5728' ,
316+ processName : 'sihost.exe' ,
317+ commandLine : 'sihost.exe'
281318 } ,
282319 {
283320 label : 'svchost.exe' ,
284321 description : '5372' ,
285322 detail : '' ,
286- id : '5372'
323+ id : '5372' ,
324+ processName : 'svchost.exe' ,
325+ commandLine : ''
287326 } ,
288327 {
289328 label : 'System' ,
290329 description : '4' ,
291330 detail : '' ,
292- id : '4'
331+ id : '4' ,
332+ processName : 'System' ,
333+ commandLine : ''
293334 }
294335 ] ;
295336 when ( processService . exec ( WmicProcessParser . wmicCommand . command , anything ( ) , anything ( ) ) ) . thenResolve ( { stdout : windowsOutput } ) ;
@@ -334,37 +375,49 @@ ProcessId=8026\r
334375 label : 'python.exe' ,
335376 description : '8026' ,
336377 detail : 'C:\\Users\\Contoso\\AppData\\Local\\Programs\\Python\\Python37\\python.exe c:/Users/Contoso/Documents/foo_bar.py' ,
337- id : '8026'
378+ id : '8026' ,
379+ processName : 'python.exe' ,
380+ commandLine : 'C:\\Users\\Contoso\\AppData\\Local\\Programs\\Python\\Python37\\python.exe c:/Users/Contoso/Documents/foo_bar.py'
338381 } ,
339382 {
340383 label : 'python.exe' ,
341384 description : '6028' ,
342385 detail : 'C:\\Users\\Contoso\\AppData\\Local\\Programs\\Python\\Python37\\python.exe c:/Users/Contoso/Documents/hello_world.py' ,
343- id : '6028'
386+ id : '6028' ,
387+ processName : 'python.exe' ,
388+ commandLine : 'C:\\Users\\Contoso\\AppData\\Local\\Programs\\Python\\Python37\\python.exe c:/Users/Contoso/Documents/hello_world.py'
344389 } ,
345390 {
346391 label : 'sihost.exe' ,
347392 description : '5728' ,
348393 detail : 'sihost.exe' ,
349- id : '5728'
394+ id : '5728' ,
395+ processName : 'sihost.exe' ,
396+ commandLine : 'sihost.exe'
350397 } ,
351398 {
352399 label : 'svchost.exe' ,
353400 description : '5372' ,
354401 detail : '' ,
355- id : '5372'
402+ id : '5372' ,
403+ processName : 'svchost.exe' ,
404+ commandLine : ''
356405 } ,
357406 {
358407 label : 'svchost.exe' ,
359408 description : '5912' ,
360409 detail : 'C:\\WINDOWS\\system32\\svchost.exe -k UnistackSvcGroup -s CDPUserSvc' ,
361- id : '5912'
410+ id : '5912' ,
411+ processName : 'svchost.exe' ,
412+ commandLine : 'C:\\WINDOWS\\system32\\svchost.exe -k UnistackSvcGroup -s CDPUserSvc'
362413 } ,
363414 {
364415 label : 'System' ,
365416 description : '4' ,
366417 detail : '' ,
367- id : '4'
418+ id : '4' ,
419+ processName : 'System' ,
420+ commandLine : ''
368421 }
369422 ] ;
370423 when ( processService . exec ( WmicProcessParser . wmicCommand . command , anything ( ) , anything ( ) ) ) . thenResolve ( { stdout : windowsOutput } ) ;
0 commit comments