Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

Node.js bindings: Add sudo to invasive tests only if euid is not root #1987

Conversation

gabrielschulhof
Copy link

Signed-off-by: Gabriel Schulhof gabriel.schulhof@intel.com

Replaces #1972
Additionally fixes the situation where an async callback is being called twice.

@gabrielschulhof
Copy link
Author

@wanghongjuan I've now fixed the "Callback was already called" error as well. Unfortunately the environment in which you're trying to run the test does not seem to have proper time zone support, so the test will fail. At least now the error message will point to the root of the problem (the lack of time zone support). Can you please confirm that the error "Callback was already called" is replaced by an error that actually shows the problem (such as

Error: Test requested teardown: Command failed: /bin/sh -c timedatectl set-timezone 
Invalid number of arguments.

or

Error: Test requested teardown: Command failed: /bin/sh -c timedatectl set-timezone n/a
Failed to set time zone: Invalid time zone 'n/a'

@wanghongjuan
Copy link

@gabrielschulhof the error was reproduced when I added console.error( error.message ); in suite.js line 104.

Command failed: /bin/sh -c timedatectl set-timezone 
Invalid number of arguments.

Closes solettaprojectgh-1987

Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>
@gabrielschulhof gabrielschulhof force-pushed the nodejs-invasive-tests-add-sudo-based-on-euid-v2 branch from cf6a35c to af45c38 Compare May 10, 2016 07:04
@gabrielschulhof gabrielschulhof merged commit af45c38 into solettaproject:master May 10, 2016
@gabrielschulhof gabrielschulhof deleted the nodejs-invasive-tests-add-sudo-based-on-euid-v2 branch May 10, 2016 07:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants