-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Test changes needed for running in a container #7869
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
Test changes needed for running in a container #7869
Conversation
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.
typo raher -> rather
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.
Use Where-Object instead
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.
typo InternNetworkV6 -> InterNetworkV6
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.
Use ForEach-Object instead
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.
typo in -> if
test/powershell/Modules/Microsoft.PowerShell.Management/Test-Connection.Tests.ps1
Outdated
Show resolved
Hide resolved
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.
Can you double check if this still needs to be maked as Pending. It worked on my Ubuntu 18.04 VM.
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.
it's definitely failing on my mac, I'll mark it pending for $IsMacOS
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.
Same as above.
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.
Can you remove this comment?
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.
Please remove comment if it does not hang in VSTS.
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.
Where is this defined?
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.
Please add a comment about $env:__InContainer
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.
The code to open help in a browser is pretty simple. Perhaps rather than skipping these tests in non-desktop environments, we should instead have a test hook to validate that it hit the right code path or even start a test executable passed the URL as an argument?
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.
there is a test hook here already, and it is used to validate all the uris. This is a single test which starts the browser.
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.
I'm ok with this for now
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.
Please add a comment about $env:__InContainer
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.
Please remove comment if it does not hang in VSTS.
|
@JamesWTruher Please also have a look at the test failure in CI for Linux and MacOS. Also please push a commit with |
c6b7e71 to
2efd9bd
Compare
|
@JamesWTruher Test-Connection test is failing on Linux and macOS with Also please push a commit with |
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.
The code to open help in a browser is pretty simple. Perhaps rather than skipping these tests in non-desktop environments, we should instead have a test hook to validate that it hit the right code path or even start a test executable passed the URL as an argument?
2efd9bd to
b670ede
Compare
|
@SteveL-MSFT please see my comment above re: starting a browser |
make the `MTUSizeDetect` tests pending for MacOS only.
b670ede to
c7d0f7a
Compare
PR Summary
These are changes which will enable our tests to be run within containers for the 9 different Linux platforms that we provide. In order to successfully run in a container an environment variable
__InContainermust be present to avoid running the help test which starts a browser. The best place to define this variable is in the Dockerfile, ala:ENV __InContainer 1Additionally, these tests may be executed against the already installed PowerShell.
This is the first step in completely automating our tests against packaged (rather than built) PowerShell.
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:to the beginning of the title and remove the prefix when the PR is ready.[feature]if the change is significant or affects feature tests