aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jco...@apache.org
Subject aurora git commit: AURORA-1741 Added missing test cases
Date Fri, 29 Jul 2016 23:51:23 GMT
Repository: aurora
Updated Branches:
  refs/heads/master e14d0a31c -> efc5ff6ab


AURORA-1741 Added missing test cases

Bugs closed: AURORA-1741

Reviewed at https://reviews.apache.org/r/50617/


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

Branch: refs/heads/master
Commit: efc5ff6ab45e87b4105fff41de6bfea5c7ba9d91
Parents: e14d0a3
Author: Mehrdad Nurolahzade <mehrdad@nurolahzade.com>
Authored: Fri Jul 29 18:50:25 2016 -0500
Committer: Joshua Cohen <jcohen@apache.org>
Committed: Fri Jul 29 18:50:25 2016 -0500

----------------------------------------------------------------------
 src/test/python/apache/aurora/client/test_config.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/aurora/blob/efc5ff6a/src/test/python/apache/aurora/client/test_config.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/test_config.py b/src/test/python/apache/aurora/client/test_config.py
index 4742fa2..5cf68a5 100644
--- a/src/test/python/apache/aurora/client/test_config.py
+++ b/src/test/python/apache/aurora/client/test_config.py
@@ -33,6 +33,7 @@ from apache.aurora.config.schema.base import (
     Task,
     UpdateConfig
 )
+from apache.thermos.config.schema_base import Process
 
 MESOS_CONFIG_BASE = """
 HELLO_WORLD = Job(
@@ -227,8 +228,8 @@ def test_update_config_fails_insufficient_watch_secs_equal_to_target():
 
 def test_validate_deprecated_config_adds_warning_for_production():
   job = Job(name='hello_world', role='john_doe', cluster='test-cluster', environment='test',
-    task=Task(name='main', processes=[], resources=Resources(cpu=0.1, ram=64 * MB, disk=64
* MB)),
-    production='true')
+    task=Task(name='main', processes=[Process(cmdline='echo {{_unbound_}}', name='eco')],
+    resources=Resources(cpu=0.1, ram=64 * MB, disk=64 * MB)), production='true')
   with mock.patch('apache.aurora.client.config.deprecation_warning') as mock_warning:
     config._validate_deprecated_config(AuroraConfig(job))
     mock_warning.assert_called_once_with(PRODUCTION_DEPRECATED_WARNING)
@@ -236,7 +237,8 @@ def test_validate_deprecated_config_adds_warning_for_production():
 
 def test_validate_deprecated_config_adds_no_warning_when_tier_is_set():
   job = Job(name='hello_world', role='john_doe', cluster='test-cluster', environment='test',
-    task=Task(name='main', processes=[], resources=Resources(cpu=0.1, ram=64 * MB, disk=64
* MB)),
+    task=Task(name='main', processes=[Process(cmdline='echo {{_unbound_}}', name='eco')],
+    resources=Resources(cpu=0.1, ram=64 * MB, disk=64 * MB)),
   production='true', tier='preferred')
   with mock.patch('apache.aurora.client.config.deprecation_warning') as mock_warning:
     config._validate_deprecated_config(AuroraConfig(job))


Mime
View raw message