You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by qi...@apache.org on 2017/08/03 12:59:44 UTC

mesos git commit: Replaced raw string with normal string for `DefaultContainerDNSCniTest`.

Repository: mesos
Updated Branches:
  refs/heads/master 9b658ce17 -> 50b7a3e0a


Replaced raw string with normal string for `DefaultContainerDNSCniTest`.


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

Branch: refs/heads/master
Commit: 50b7a3e0a39df671892546c1b09d9c3c98e15125
Parents: 9b658ce
Author: Qian Zhang <zh...@gmail.com>
Authored: Thu Aug 3 20:48:57 2017 +0800
Committer: Qian Zhang <zh...@gmail.com>
Committed: Thu Aug 3 20:59:04 2017 +0800

----------------------------------------------------------------------
 src/tests/containerizer/cni_isolator_tests.cpp | 107 ++++++++++----------
 1 file changed, 51 insertions(+), 56 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/50b7a3e0/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 baaed8c..60c85ad 100644
--- a/src/tests/containerizer/cni_isolator_tests.cpp
+++ b/src/tests/containerizer/cni_isolator_tests.cpp
@@ -1743,67 +1743,62 @@ INSTANTIATE_TEST_CASE_P(
     DefaultContainerDNSCniTest,
     ::testing::Values(
         // A DNS information for the `__MESOS_TEST__` CNI network.
-        string(
-            R"~(
-            {
-              "mesos": [
-                {
-                  "network_mode": "CNI",
-                  "network_name": "__MESOS_TEST__",
-                  "dns": {
-                    "nameservers": [ "8.8.8.8", "8.8.4.4" ],
-                    "domain": "mesos.apache.org",
-                    "search": [ "a.mesos.apache.org", "a.mesos.apache.org" ],
-                    "options": [ "timeout:3", "attempts:2" ]
-                  }
-                }
-              ]
-            })~"),
+        "{\n"
+        "  \"mesos\": [\n"
+        "    {\n"
+        "      \"network_mode\": \"CNI\",\n"
+        "      \"network_name\": \"__MESOS_TEST__\",\n"
+        "      \"dns\": {\n"
+        "        \"nameservers\": [ \"8.8.8.8\", \"8.8.4.4\" ],\n"
+        "        \"domain\": \"mesos.apache.org\",\n"
+        "        \"search\": [ \"a.mesos.apache.org\" ],\n"
+        "        \"options\": [ \"timeout:3\", \"attempts:2\" ]\n"
+        "      }\n"
+        "    }\n"
+        "  ]\n"
+        "}",
         // A DNS information with `network_mode == CNI`, but without a network
         // name, acts as a wildcard match making it the default DNS for any CNI
         // network not specified in the `--default_container_dns` flag.
-        string(
-            R"~(
-            {
-              "mesos": [
-                {
-                  "network_mode": "CNI",
-                  "dns": {
-                    "nameservers": [ "8.8.8.8", "8.8.4.4" ],
-                    "domain": "mesos.apache.org",
-                    "search": [ "a.mesos.apache.org", "a.mesos.apache.org" ],
-                    "options": [ "timeout:3", "attempts:2" ]
-                  }
-                }
-              ]
-            })~"),
+        "{\n"
+        "  \"mesos\": [\n"
+        "    {\n"
+        "      \"network_mode\": \"CNI\",\n"
+        "      \"dns\": {\n"
+        "        \"nameservers\": [ \"8.8.8.8\", \"8.8.4.4\" ],\n"
+        "        \"domain\": \"mesos.apache.org\",\n"
+        "        \"search\": [ \"a.mesos.apache.org\" ],\n"
+        "        \"options\": [ \"timeout:3\", \"attempts:2\" ]\n"
+        "      }\n"
+        "    }\n"
+        "  ]\n"
+        "}",
         // Two DNS information, one is specific for `__MESOS_TEST__` CNI
         // network, the other is the defaule DNS for any CNI network not
         // specified in the `--default_container_dns` flag.
-        string(
-            R"~(
-            {
-              "mesos": [
-                {
-                  "network_mode": "CNI",
-                  "network_name": "__MESOS_TEST__",
-                  "dns": {
-                    "nameservers": [ "8.8.8.8", "8.8.4.4" ],
-                    "domain": "mesos.apache.org",
-                    "search": [ "a.mesos.apache.org", "a.mesos.apache.org" ],
-                    "options": [ "timeout:3", "attempts:2" ]
-                  }
-                },
-                {
-                  "network_mode": "CNI",
-                  "dns": {
-                    "nameservers": [ "8.8.8.9", "8.8.4.5" ],
-                    "domain": "mesos1.apache.org",
-                    "search": [ "b.mesos.apache.org", "b.mesos.apache.org" ],
-                    "options": [ "timeout:9", "attempts:5" ]
-                  }
-                }
-              ]})~")));
+        "{\n"
+        "  \"mesos\": [\n"
+        "    {\n"
+        "      \"network_mode\": \"CNI\",\n"
+        "      \"network_name\": \"__MESOS_TEST__\",\n"
+        "      \"dns\": {\n"
+        "        \"nameservers\": [ \"8.8.8.8\", \"8.8.4.4\" ],\n"
+        "        \"domain\": \"mesos.apache.org\",\n"
+        "        \"search\": [ \"a.mesos.apache.org\" ],\n"
+        "        \"options\": [ \"timeout:3\", \"attempts:2\" ]\n"
+        "      }\n"
+        "    },\n"
+        "    {\n"
+        "      \"network_mode\": \"CNI\",\n"
+        "      \"dns\": {\n"
+        "        \"nameservers\": [ \"8.8.8.9\", \"8.8.4.5\" ],\n"
+        "        \"domain\": \"mesos1.apache.org\",\n"
+        "        \"search\": [ \"b.mesos.apache.org\" ],\n"
+        "        \"options\": [ \"timeout:9\", \"attempts:5\" ]\n"
+        "      }\n"
+        "    }\n"
+        "  ]\n"
+        "}"));
 
 
 // This test verifies the DNS configuration of the container can be
@@ -1877,7 +1872,7 @@ TEST_P(DefaultContainerDNSCniTest, ROOT_VerifyDefaultDNS)
       "set -x\n"
       "cat > expected <<EOF\n"
       "domain mesos.apache.org\n"
-      "search a.mesos.apache.org a.mesos.apache.org\n"
+      "search a.mesos.apache.org\n"
       "options timeout:3 attempts:2\n"
       "nameserver 8.8.8.8\n"
       "nameserver 8.8.4.4\n"