Skip to content
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

DisableHostNetworkConnection requires UAC elevation #4

Open
IgorMilavec opened this issue Mar 20, 2022 · 4 comments · May be fixed by #7
Open

DisableHostNetworkConnection requires UAC elevation #4

IgorMilavec opened this issue Mar 20, 2022 · 4 comments · May be fixed by #7

Comments

@IgorMilavec
Copy link
Collaborator

If your system has UAC enabled and you run VS normal/unelevated, the DisableHostNetworkConnection calls fail with:

System.ApplicationException: Failed to disable 'Ethernet 2' network connection. Return value is 5.
Make sure you're running the tests with elevated priviliges.

Could we mark tests as inconclusive instead of failing them in this case?
DisableHostNetworkConnection could use new Win32Exception(retValue), this would provide better error information.

@drieseng
Copy link
Member

drieseng commented Mar 20, 2022

@IgorMilavec I have several fixes to stabilize the integration tests. I'll submit a PR when the open PR is merged.

That said ... I have no solution for some "(loss of) network connectivity" related tests like this one.
Let me know if you have any ideas.
For now, I'll ignore these tests in my next PR.

@IgorMilavec
Copy link
Collaborator Author

I access my dev machine over RDP and these tests would cut me off.
What about pausing the docker container? Again we make a lot of assumptions here, but if the container is running on the same host as tests, this might work.

@drieseng
Copy link
Member

We'd have to test it. Can you have a look at this?

@IgorMilavec
Copy link
Collaborator Author

I have done some preliminary tests and pausing the docker container works. I'll prepare it and make a PR after you submit your pending changes, otherwise we'll have a lot of merge conflicts.

@IgorMilavec IgorMilavec linked a pull request Apr 9, 2022 that will close this issue
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 a pull request may close this issue.

2 participants