Skip to content

Conversation

@JamesWTruher
Copy link
Collaborator

@JamesWTruher JamesWTruher commented Sep 26, 2018

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 __InContainer must 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 1

Additionally, 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

Copy link
Member

Choose a reason for hiding this comment

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

typo raher -> rather

Copy link
Member

Choose a reason for hiding this comment

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

Use Where-Object instead

Copy link
Member

Choose a reason for hiding this comment

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

typo InternNetworkV6 -> InterNetworkV6

Copy link
Member

Choose a reason for hiding this comment

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

Use ForEach-Object instead

Copy link
Member

Choose a reason for hiding this comment

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

typo in -> if

Copy link
Member

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.

Copy link
Collaborator Author

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

Copy link
Member

Choose a reason for hiding this comment

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

Same as above.

Copy link
Member

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?

Copy link
Member

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.

Copy link
Member

Choose a reason for hiding this comment

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

Where is this defined?

Copy link
Member

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

Copy link
Member

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?

Copy link
Collaborator Author

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.

Copy link
Member

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

Copy link
Member

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

Copy link
Member

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.

@adityapatwardhan
Copy link
Member

@JamesWTruher Please also have a look at the test failure in CI for Linux and MacOS.

Also please push a commit with [Feature] to run all tests.

@adityapatwardhan
Copy link
Member

@JamesWTruher Test-Connection test is failing on Linux and macOS with Exception calling "GetHostEntry" with "1" argument(s): "No such device or address"

Also please push a commit with [Feature]

Copy link
Member

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?

@JamesWTruher
Copy link
Collaborator Author

@SteveL-MSFT please see my comment above re: starting a browser

make the `MTUSizeDetect` tests pending for MacOS only.
@adityapatwardhan adityapatwardhan merged commit 98cf44c into PowerShell:master Sep 28, 2018
@JamesWTruher JamesWTruher deleted the containertestfixes branch September 23, 2023 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants