From f97ee1865a18a16176c054577ed953eedcda76f2 Mon Sep 17 00:00:00 2001 From: David Barth Date: Tue, 7 Feb 2017 10:40:37 +0100 Subject: [PATCH] Fix test-installed-snaps.js by ensuring sudo is set to true for install or remove operations (#150) --- tests/run-tests.sh | 2 +- tests/utils/snap-cmd-util.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/run-tests.sh b/tests/run-tests.sh index a45ab039..e441f008 100755 --- a/tests/run-tests.sh +++ b/tests/run-tests.sh @@ -58,7 +58,7 @@ if [ ! -d "$modules_dir" ]; then modules_dir="../node_modules" fi -echo 'Run selenium tests for snapweb service on given IP' +echo "Run selenium tests for snapweb on $host:$port with user:$user/$sudo" USER=$user HOST=$host PORT=$port SUDO=$sudo $modules_dir/.bin/wdio -b https://$2:4201 exitcode=$? diff --git a/tests/utils/snap-cmd-util.js b/tests/utils/snap-cmd-util.js index 4d364d3b..5a6e9bcd 100644 --- a/tests/utils/snap-cmd-util.js +++ b/tests/utils/snap-cmd-util.js @@ -103,11 +103,11 @@ SnapUtil.prototype.getToken = function() { } SnapUtil.prototype.installSnap = function(name) { - return this._promisifyExec('snap install ' + name, this.isSudoRequired); + return this._promisifyExec('snap install ' + name, true); } SnapUtil.prototype.removeSnap = function(name) { - return this._promisifyExec('snap remove ' + name, this.isSudoRequired); + return this._promisifyExec('snap remove ' + name, true); } SnapUtil.prototype.snapVersion = function() {