Skip to content

DisableHostNetworkConnection requires UAC elevation #4

Open

Description

@IgorMilavec

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.

Activity

  1. drieseng commented on Mar 20, 2022

    @drieseng
    Member

    @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.

  2. IgorMilavec commented on Mar 22, 2022

    @IgorMilavec
    CollaboratorAuthor

    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.

  3. drieseng commented on Mar 22, 2022

    @drieseng
    Member

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

  4. IgorMilavec commented on Mar 23, 2022

    @IgorMilavec
    CollaboratorAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions