You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by kl...@apache.org on 2017/09/22 12:38:48 UTC
mesos git commit: Renamed constants for CLI tests.
Repository: mesos
Updated Branches:
refs/heads/master ae89b19ff -> 5d4f588eb
Renamed constants for CLI tests.
These constants are now prefixed by 'TEST' instead of 'DEFAULT'.
Review: https://reviews.apache.org/r/61210/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/5d4f588e
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/5d4f588e
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/5d4f588e
Branch: refs/heads/master
Commit: 5d4f588eb85cdf5f79ebcffb213cfd0ca63c2215
Parents: ae89b19
Author: Armand Grillet <ag...@mesosphere.io>
Authored: Fri Sep 22 05:36:25 2017 -0700
Committer: Kevin Klues <kl...@gmail.com>
Committed: Fri Sep 22 05:36:25 2017 -0700
----------------------------------------------------------------------
src/python/cli_new/lib/cli/tests/base.py | 24 +++++++++++-----------
src/python/cli_new/lib/cli/tests/constants.py | 8 ++++----
2 files changed, 16 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/5d4f588e/src/python/cli_new/lib/cli/tests/base.py
----------------------------------------------------------------------
diff --git a/src/python/cli_new/lib/cli/tests/base.py b/src/python/cli_new/lib/cli/tests/base.py
index 1101aef..33c67c1 100644
--- a/src/python/cli_new/lib/cli/tests/base.py
+++ b/src/python/cli_new/lib/cli/tests/base.py
@@ -30,10 +30,10 @@ import parse
import cli.http as http
-from cli.tests.constants import DEFAULT_AGENT_IP
-from cli.tests.constants import DEFAULT_AGENT_PORT
-from cli.tests.constants import DEFAULT_MASTER_IP
-from cli.tests.constants import DEFAULT_MASTER_PORT
+from cli.tests.constants import TEST_AGENT_IP
+from cli.tests.constants import TEST_AGENT_PORT
+from cli.tests.constants import TEST_MASTER_IP
+from cli.tests.constants import TEST_MASTER_PORT
from cli.exceptions import CLIException
@@ -159,9 +159,9 @@ class Master(Executable):
flags = {}
if "ip" not in flags:
- flags["ip"] = DEFAULT_MASTER_IP
+ flags["ip"] = TEST_MASTER_IP
if "port" not in flags:
- flags["port"] = DEFAULT_MASTER_PORT
+ flags["port"] = TEST_MASTER_PORT
if "work_dir" not in flags:
flags["work_dir"] = tempfile.mkdtemp()
@@ -202,13 +202,13 @@ class Agent(Executable):
flags = {}
if "ip" not in flags:
- flags["ip"] = DEFAULT_AGENT_IP
+ flags["ip"] = TEST_AGENT_IP
if "port" not in flags:
- flags["port"] = DEFAULT_AGENT_PORT
+ flags["port"] = TEST_AGENT_PORT
if "master" not in flags:
flags["master"] = "{ip}:{port}".format(
- ip=DEFAULT_MASTER_IP,
- port=DEFAULT_MASTER_PORT)
+ ip=TEST_MASTER_IP,
+ port=TEST_MASTER_PORT)
if "work_dir" not in flags:
flags["work_dir"] = tempfile.mkdtemp()
if "runtime_dir" not in flags:
@@ -296,8 +296,8 @@ class Task(Executable):
if "master" not in flags:
flags["master"] = "{ip}:{port}".format(
- ip=DEFAULT_MASTER_IP,
- port=DEFAULT_MASTER_PORT)
+ ip=TEST_MASTER_IP,
+ port=TEST_MASTER_PORT)
if "name" not in flags:
flags["name"] = "task-{id}".format(id=Task.count)
Task.count += 1
http://git-wip-us.apache.org/repos/asf/mesos/blob/5d4f588e/src/python/cli_new/lib/cli/tests/constants.py
----------------------------------------------------------------------
diff --git a/src/python/cli_new/lib/cli/tests/constants.py b/src/python/cli_new/lib/cli/tests/constants.py
index 5d45d94..1398701 100644
--- a/src/python/cli_new/lib/cli/tests/constants.py
+++ b/src/python/cli_new/lib/cli/tests/constants.py
@@ -18,8 +18,8 @@
A collection of constants useful for the CLI unit tests.
"""
-DEFAULT_MASTER_IP = "127.0.0.1"
-DEFAULT_MASTER_PORT = "9090"
+TEST_MASTER_IP = "127.0.0.1"
+TEST_MASTER_PORT = "9090"
-DEFAULT_AGENT_IP = "127.0.0.1"
-DEFAULT_AGENT_PORT = "9091"
+TEST_AGENT_IP = "127.0.0.1"
+TEST_AGENT_PORT = "9091"