You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ji...@apache.org on 2016/06/22 23:01:05 UTC

[03/10] mesos git commit: Fixed broken cni isolator test on centos7.

Fixed broken cni isolator test on centos7.

Review: https://reviews.apache.org/r/48989/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/7fca3632
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/7fca3632
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/7fca3632

Branch: refs/heads/master
Commit: 7fca36322efef219eef008088abe91fe9ae8b7f2
Parents: eddf2ad
Author: Gilbert Song <so...@gmail.com>
Authored: Wed Jun 22 16:00:30 2016 -0700
Committer: Jie Yu <yu...@gmail.com>
Committed: Wed Jun 22 16:00:30 2016 -0700

----------------------------------------------------------------------
 src/tests/containerizer/cni_isolator_tests.cpp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/7fca3632/src/tests/containerizer/cni_isolator_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/cni_isolator_tests.cpp b/src/tests/containerizer/cni_isolator_tests.cpp
index a51f24b..6367e6a 100644
--- a/src/tests/containerizer/cni_isolator_tests.cpp
+++ b/src/tests/containerizer/cni_isolator_tests.cpp
@@ -180,8 +180,13 @@ TEST_F(CniIsolatorTest, ROOT_INTERNET_CURL_LaunchCommandTask)
 
   const Offer& offer = offers.get()[0];
 
+  // NOTE: We use a non-shell command here because 'sh' might not be
+  // in the PATH. 'alpine' does not specify env PATH in the image. On
+  // some linux distribution, '/sbin' is not in the PATH by default.
   CommandInfo command;
-  command.set_value("ifconfig");
+  command.set_shell(false);
+  command.set_value("/sbin/ifconfig");
+  command.add_arguments("ifconfig");
 
   TaskInfo task = createTask(
       offer.slave_id(),