Skip to content

Conversation

@JamesWTruher
Copy link
Collaborator

PR Summary

Change and harden the logic when determining whether a syslog entry has been made. Rather than using the logid, I am determining whether or not a particular PID shows up as a syslog entry. This is a fix for #15814.

PR Context

PR Checklist

@ghost ghost assigned iSazonov Jul 29, 2021
@iSazonov iSazonov added the CL-Test Indicates that a PR should be marked as a test change in the Change Log label Jul 29, 2021
@rjmholt rjmholt requested review from PaulHigin and TravisEz13 July 29, 2021 16:22
Comment on lines +256 to +259
$items = Get-PSSysLog -Path $SyslogFile
@($items).Count | Should -BeGreaterThan 0
$logs = $items | Where-Object { $_.ProcessId -eq $result }
$logs | Should -BeNullOrEmpty
Copy link
Collaborator

Choose a reason for hiding this comment

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

It looks like the test previously assumed there would be no entries, but now we expect some entries but none with the PID data. What's changed?

Copy link
Member

Choose a reason for hiding this comment

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

I think this was added to make it more robust.

@iSazonov iSazonov merged commit 881f31b into PowerShell:master Jul 30, 2021
@iSazonov iSazonov added this to the 7.2.0-preview.9 milestone Jul 30, 2021
@ghost
Copy link

ghost commented Aug 23, 2021

🎉v7.2.0-preview.9 has been released which incorporates this pull request.:tada:

Handy links:

@ghost
Copy link

ghost commented Sep 28, 2021

🎉v7.2.0-preview.10 has been released which incorporates this pull request.:tada:

Handy links:

@JamesWTruher JamesWTruher deleted the SyslogTest001 branch September 23, 2023 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-Test Indicates that a PR should be marked as a test change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants