-
Notifications
You must be signed in to change notification settings - Fork 149
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
xWebsite: Compare LogTruncateSize parameter correctly #381
Conversation
Could you please look why the tests are failing? |
Looks like there was something else going on at the same time: I'm not sure how to trigger the appveyor build again. |
Ah some timing issue, think I’ve seen that before. Closing the PR and directly reopening the existing PR again will kick off the tests again. |
Codecov Report
@@ Coverage Diff @@
## dev #381 +/- ##
=======================================
Coverage 90.44% 90.44%
=======================================
Files 17 17
Lines 2450 2450
=======================================
Hits 2216 2216
Misses 234 234
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @nickgw)
a discussion (no related file):
Could you please look at the unit tests for this resource and figure out why (unless you already know) the unit tests passed with the wrong parameter name LogTruncateSize
? We need to add a regression test that tests this change.
I believe it is because the unit tests always check for failure scenarios but never successful scenarios. If I'm reading the tests right: L269 test that they match, calling the right parameter names ( L681 test for failure when the L777 tests for failure when L1524 isn't testing for comparison between the two (though I'm not the best with Pester). If there was a test that the given |
When looking at the lines you provided, it seems that the unit test was mocking this correctly, so the unit tests always tests the correct property. We should test this property in the integration test, where it would have been caught, since there |
No I take that back. This should have been caught in the unit tests. Something is off with the unit test. It mocked the return value as, for example, Using the parameters you used to hit this bug, could you with those create a new unit test for each function, that catch this bug (and with you fix the tests passes)? |
Labeling this pull request (PR) as abandoned since it has gone 14 days or more since the last update. An abandoned PR can be continued by another contributor. The abandoned label will be removed if work on this PR is taken up again. |
xWebsite attempts to compare the passed
$LogTruncateSize
to (essentially)(Get-Website -Name $name).logFile.LogTruncateSize
except, the parameter istruncatesize
. This causes the comparison to always fail.Fixes #380
This change is