Skip to content

Need to support running in root privilege on Linux Travis CI similar as in AppVeyor #5645

Description

We need to support running tests in root privilege on Linux Travis CI in a similar way as our windows tests running in AppVeyor. For windows tests, we have a tag RequireAdminOnWindows to indicate the tests that need admin privilege. We run those tests in an admin pwsh session, and then we use runas to remove admin privilege and run the rest tests.

With sudo: required in .travis.yml, Travis CI Linux builds run in regular user privilege by default, but you can get the root privilege using sudo with no need to provide a password (see the documentation). So we should be able to support a similar tag like RequireAdminOnWindows on Linux.

Activity

  1. TravisEz13 commented on Jan 27, 2018

    @TravisEz13
    Member
  2. iSazonov commented on Jan 27, 2018

    @iSazonov
    Collaborator

    I found some tests that use Test-Elevated - I believe we should fix them too.

  3. anmenaga commented on Feb 9, 2018

    @anmenaga

    Can somebody please confirm/deny if the fix for this won't be limited to "Travis CI" system?
    I'm talking about a scenario where I run PS tests on a private Linux VM.
    Assuming tests are marked properly, will they run with admin privilege in this case?

  4. TravisEz13 commented on Feb 9, 2018

    @TravisEz13
    Member

    you could use the same commands to run locally. The same situation as with windows today.

  5. kalgiz commented on Feb 16, 2018

    @kalgiz
    Contributor

    Resolved in #6145 PR.

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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions