Repository: mesos Updated Branches: refs/heads/master 1e786dd94 -> e0ad7a8f0
Fixed coding style issues in ProvisionerDockerBackendTest. Replaced a string concatenation with path::join() and a shell echo command with os::write() in ProvisionerDockerBackendTest.ROOT_INTERNET_CURL_Overwrite. Review: https://reviews.apache.org/r/58766/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/e0ad7a8f Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/e0ad7a8f Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/e0ad7a8f Branch: refs/heads/master Commit: e0ad7a8f026908fcf4e43c8f809ff9cbc4b7b60f Parents: 1e786dd Author: Chun-Hung Hsiao <[email protected]> Authored: Sat May 6 13:34:30 2017 -0700 Committer: Jie Yu <[email protected]> Committed: Sat May 6 13:40:26 2017 -0700 ---------------------------------------------------------------------- src/tests/containerizer/provisioner_docker_tests.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/e0ad7a8f/src/tests/containerizer/provisioner_docker_tests.cpp ---------------------------------------------------------------------- diff --git a/src/tests/containerizer/provisioner_docker_tests.cpp b/src/tests/containerizer/provisioner_docker_tests.cpp index 4341621..ff0ad90 100644 --- a/src/tests/containerizer/provisioner_docker_tests.cpp +++ b/src/tests/containerizer/provisioner_docker_tests.cpp @@ -808,8 +808,8 @@ TEST_P(ProvisionerDockerBackendTest, ROOT_INTERNET_CURL_Overwrite) // in the 2nd layer of the testing image during provisioning. // For more details about the provisioner directory please see: // https://github.com/apache/mesos/blob/master/src/slave/containerizer/mesos/provisioner/paths.hpp#L34-L48 // NOLINT - const string hostFile = flags.work_dir + "/abc"; - os::shell("echo abc > " + hostFile); + const string hostFile = path::join(flags.work_dir, "abc"); + ASSERT_SOME(os::write(hostFile, "abc")); ASSERT_SOME(os::shell("test -s " + hostFile)); driver.launchTasks(offer.id(), {task});
