Set Docker info for the test `TaskUsesDockerContainerInfo`.

Docker info is required when container's type is DOCKER, it is enforced
in `mesos::internal::common::validation:validateContainerInfo()`. So in
this test, we have to set Docker info to pass the validation.

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


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

Branch: refs/heads/master
Commit: e7cb1d9bd0ee040b8ab7873f0770bb4f014b7f5c
Parents: be2ce4c
Author: Qian Zhang <zhq527...@gmail.com>
Authored: Mon Mar 12 19:54:14 2018 -0700
Committer: Gilbert Song <songzihao1...@gmail.com>
Committed: Mon Mar 12 22:41:05 2018 -0700

----------------------------------------------------------------------
 src/tests/master_validation_tests.cpp | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/e7cb1d9b/src/tests/master_validation_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_validation_tests.cpp 
b/src/tests/master_validation_tests.cpp
index 77ec7fb..53cc3ed 100644
--- a/src/tests/master_validation_tests.cpp
+++ b/src/tests/master_validation_tests.cpp
@@ -3385,6 +3385,7 @@ TEST_F(TaskGroupValidationTest, 
TaskUsesDockerContainerInfo)
   task1.mutable_slave_id()->MergeFrom(offer.slave_id());
   task1.mutable_resources()->MergeFrom(resources);
   task1.mutable_container()->set_type(ContainerInfo::DOCKER);
+  task1.mutable_container()->mutable_docker()->set_image("alpine");
 
   // Create a valid task.
   TaskInfo task2;

Reply via email to