aurora-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Chu-Carroll" <mchucarr...@twopensource.com>
Subject Re: Review Request 23949: Make testing of v1 command hooks easier.
Date Fri, 25 Jul 2014 20:50:40 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23949/
-----------------------------------------------------------

(Updated July 25, 2014, 4:50 p.m.)


Review request for Aurora, David McLaughlin and Joe Smith.


Bugs: aurora-603
    https://issues.apache.org/jira/browse/aurora-603


Repository: aurora


Description
-------

Make testing of v1 command hooks easier.

In order to be able to test v1 command hooks on real commands, it would
be helpful to be able to mock out the body of the commands. In order to
do this, I've separated the commands into an invocation frame, and
the actual command implementation.


Diffs
-----

  src/main/python/apache/aurora/client/commands/core.py b4169995e996b17dda3dc09f2e5961d77e045d87


Diff: https://reviews.apache.org/r/23949/diff/


Testing
-------

?  incubator-aurora git:(extract_killall) ? git commit -a --amend
[extract_killall 570bd1e] Make testing of v1 command hooks easier.
 2 files changed, 105 insertions(+), 73 deletions(-)
?  incubator-aurora git:(extract_killall) ./pants src/test/python/apache/aurora/client:all
Build operating on top level addresses: set([BuildFileAddress(src/test/python/apache/aurora/client/BUILD,
all)])
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.22 -- pytest-2.6.0
plugins: cov, timeout
collected 4 items

src/test/python/apache/aurora/client/hooks/test_non_hooked_api.py ....

=========================== 4 passed in 0.58 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.22 -- pytest-2.6.0
plugins: cov, timeout
collected 3 items

src/test/python/apache/aurora/client/cli/test_config_noun.py ...

=========================== 3 passed in 0.88 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.22 -- pytest-2.6.0
plugins: cov, timeout
collected 28 items

src/test/python/apache/aurora/client/api/test_updater.py ............................

========================== 28 passed in 0.94 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.22 -- pytest-2.6.0
plugins: cov, timeout
collected 5 items

src/test/python/apache/aurora/client/cli/test_sla.py .....

=========================== 5 passed in 0.76 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.22 -- pytest-2.6.0
plugins: cov, timeout
collected 4 items

src/test/python/apache/aurora/client/cli/test_bridge.py ....

=========================== 4 passed in 0.02 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.22 -- pytest-2.6.0
plugins: cov, timeout
collected 3 items

src/test/python/apache/aurora/client/cli/test_task_run.py ...

=========================== 3 passed in 0.72 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.22 -- pytest-2.6.0
plugins: cov, timeout
collected 10 items

src/test/python/apache/aurora/client/test_config.py ..........

========================== 10 passed in 0.51 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.22 -- pytest-2.6.0
plugins: cov, timeout
collected 7 items

src/test/python/apache/aurora/client/cli/test_cron.py .......

=========================== 7 passed in 1.21 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.22 -- pytest-2.6.0
plugins: cov, timeout
collected 44 items

src/test/python/apache/aurora/client/cli/test_cancel_update.py ..
src/test/python/apache/aurora/client/cli/test_create.py ......
src/test/python/apache/aurora/client/cli/test_diff.py ...
src/test/python/apache/aurora/client/cli/test_kill.py .............
src/test/python/apache/aurora/client/cli/test_open.py .....
src/test/python/apache/aurora/client/cli/test_restart.py .....
src/test/python/apache/aurora/client/cli/test_status.py .......
src/test/python/apache/aurora/client/cli/test_update.py ...

========================== 44 passed in 7.74 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.22 -- pytest-2.6.0
plugins: cov, timeout
collected 2 items

src/test/python/apache/aurora/client/test_binding_helper.py ..

=========================== 2 passed in 0.39 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.22 -- pytest-2.6.0
plugins: cov, timeout
collected 6 items

src/test/python/apache/aurora/client/api/test_disambiguator.py ......

=========================== 6 passed in 0.54 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.22 -- pytest-2.6.0
plugins: cov, timeout
collected 13 items

src/test/python/apache/aurora/client/api/test_instance_watcher.py .........
src/test/python/apache/aurora/client/api/test_health_check.py ....

========================== 13 passed in 0.36 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.22 -- pytest-2.6.0
plugins: cov, timeout
collected 20 items

src/test/python/apache/aurora/client/commands/test_admin.py .....
src/test/python/apache/aurora/client/commands/test_admin_sla.py ...............

========================== 20 passed in 0.84 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.22 -- pytest-2.6.0
plugins: cov, timeout
collected 33 items

src/test/python/apache/aurora/client/commands/test_cancel_update.py ..
src/test/python/apache/aurora/client/commands/test_create.py ......
src/test/python/apache/aurora/client/commands/test_diff.py ...
src/test/python/apache/aurora/client/commands/test_kill.py ..........
src/test/python/apache/aurora/client/commands/test_listjobs.py ..
src/test/python/apache/aurora/client/commands/test_restart.py ....
src/test/python/apache/aurora/client/commands/test_status.py ...
src/test/python/apache/aurora/client/commands/test_update.py ...

========================== 33 passed in 7.85 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.22 -- pytest-2.6.0
plugins: cov, timeout
collected 4 items

src/test/python/apache/aurora/client/cli/test_quota.py ....

=========================== 4 passed in 0.75 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.22 -- pytest-2.6.0
plugins: cov, timeout
collected 4 items

src/test/python/apache/aurora/client/cli/test_plugins.py ....

=========================== 4 passed in 0.87 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.22 -- pytest-2.6.0
plugins: cov, timeout
collected 4 items

src/test/python/apache/aurora/client/api/test_scheduler_mux.py ....

=========================== 4 passed in 2.12 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.22 -- pytest-2.6.0
plugins: cov, timeout
collected 53 items

src/test/python/apache/aurora/client/api/test_scheduler_client.py .....................................................

==================== 53 passed, 1 warnings in 4.90 seconds =====================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.22 -- pytest-2.6.0
plugins: cov, timeout
collected 1 items

src/test/python/apache/aurora/client/commands/test_ssh.py .

=========================== 1 passed in 0.60 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.22 -- pytest-2.6.0
plugins: cov, timeout
collected 2 items

src/test/python/apache/aurora/client/cli/test_api_from_cli.py ..

=========================== 2 passed in 0.85 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.22 -- pytest-2.6.0
plugins: cov, timeout
collected 2 items

src/test/python/apache/aurora/client/cli/test_logging.py ..

=========================== 2 passed in 0.86 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.22 -- pytest-2.6.0
plugins: cov, timeout
collected 5 items

src/test/python/apache/aurora/client/cli/test_help.py .....

=========================== 5 passed in 0.68 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.22 -- pytest-2.6.0
plugins: cov, timeout
collected 5 items

src/test/python/apache/aurora/client/api/test_job_monitor.py .....

=========================== 5 passed in 0.53 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.22 -- pytest-2.6.0
plugins: cov, timeout
collected 6 items

src/test/python/apache/aurora/client/api/test_restarter.py ......

=========================== 6 passed in 0.51 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.22 -- pytest-2.6.0
plugins: cov, timeout
collected 12 items

src/test/python/apache/aurora/client/hooks/test_hooked_api.py ............

========================== 12 passed in 0.60 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.22 -- pytest-2.6.0
plugins: cov, timeout
collected 9 items

src/test/python/apache/aurora/client/cli/test_command_hooks.py .........

=========================== 9 passed in 0.83 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.22 -- pytest-2.6.0
plugins: cov, timeout
collected 3 items

src/test/python/apache/aurora/client/commands/test_hooks.py ...

=========================== 3 passed in 1.63 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.22 -- pytest-2.6.0
plugins: cov, timeout
collected 10 items

src/test/python/apache/aurora/client/commands/test_maintenance.py ..........

========================== 10 passed in 0.65 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.22 -- pytest-2.6.0
plugins: cov, timeout
collected 1 items

src/test/python/apache/aurora/client/commands/test_run.py .

=========================== 1 passed in 0.61 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.22 -- pytest-2.6.0
plugins: cov, timeout
collected 6 items

src/test/python/apache/aurora/client/api/test_quota_check.py ......

=========================== 6 passed in 0.14 seconds ===========================
============================= test session starts ==============================
platform darwin -- Python 2.6.8 -- py-1.4.22 -- pytest-2.6.0
plugins: cov, timeout
collected 38 items

src/test/python/apache/aurora/client/api/test_sla.py ......................................

========================== 38 passed in 0.25 seconds ===========================
src.test.python.apache.aurora.client.api.disambiguator                          .....   SUCCESS
src.test.python.apache.aurora.client.api.instance_watcher                       .....   SUCCESS
src.test.python.apache.aurora.client.api.job_monitor                            .....   SUCCESS
src.test.python.apache.aurora.client.api.mux                                    .....   SUCCESS
src.test.python.apache.aurora.client.api.quota_check                            .....   SUCCESS
src.test.python.apache.aurora.client.api.restarter                              .....   SUCCESS
src.test.python.apache.aurora.client.api.scheduler_client                       .....   SUCCESS
src.test.python.apache.aurora.client.api.sla                                    .....   SUCCESS
src.test.python.apache.aurora.client.api.updater                                .....   SUCCESS
src.test.python.apache.aurora.client.binding_helper                             .....   SUCCESS
src.test.python.apache.aurora.client.cli.api                                    .....   SUCCESS
src.test.python.apache.aurora.client.cli.bridge                                 .....   SUCCESS
src.test.python.apache.aurora.client.cli.command_hooks                          .....   SUCCESS
src.test.python.apache.aurora.client.cli.config                                 .....   SUCCESS
src.test.python.apache.aurora.client.cli.cron                                   .....   SUCCESS
src.test.python.apache.aurora.client.cli.help                                   .....   SUCCESS
src.test.python.apache.aurora.client.cli.job                                    .....   SUCCESS
src.test.python.apache.aurora.client.cli.logging                                .....   SUCCESS
src.test.python.apache.aurora.client.cli.plugins                                .....   SUCCESS
src.test.python.apache.aurora.client.cli.quota                                  .....   SUCCESS
src.test.python.apache.aurora.client.cli.sla                                    .....   SUCCESS
src.test.python.apache.aurora.client.cli.task                                   .....   SUCCESS
src.test.python.apache.aurora.client.commands.admin                             .....   SUCCESS
src.test.python.apache.aurora.client.commands.core                              .....   SUCCESS
src.test.python.apache.aurora.client.commands.hooks                             .....   SUCCESS
src.test.python.apache.aurora.client.commands.maintenance                       .....   SUCCESS
src.test.python.apache.aurora.client.commands.run                               .....   SUCCESS
src.test.python.apache.aurora.client.commands.ssh                               .....   SUCCESS
src.test.python.apache.aurora.client.config                                     .....   SUCCESS
src.test.python.apache.aurora.client.hooks.hooked_api                           .....   SUCCESS
src.test.python.apache.aurora.client.hooks.non_hooked_api                       .....   SUCCESS


Thanks,

Mark Chu-Carroll


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message