mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrei Budnik <abud...@mesosphere.com>
Subject Re: Review Request 58720: CLI: Extended the unit test infrastructure.
Date Tue, 23 May 2017 16:36:22 GMT

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




src/cli_new/lib/cli/tests/base.py
Lines 198 (patched)
<https://reviews.apache.org/r/58720/#comment249124>

    virtualenv package might help. It can create sandbox for tests and clear it automatically.



src/cli_new/lib/cli/tests/base.py
Lines 214 (patched)
<https://reviews.apache.org/r/58720/#comment249125>

    you can use lambda function 'single_slave', since it isn't used anywhere else.
    
    single_slave = lambda data: len(data["slaves"]) == 1



src/cli_new/lib/cli/tests/base.py
Lines 321 (patched)
<https://reviews.apache.org/r/58720/#comment249129>

    return any(container["executor_id"] == self.flags["name"] for container in data)
    
    BTW, should we use lambda function here like I've mentioned above?



src/cli_new/lib/cli/tests/base.py
Lines 352 (patched)
<https://reviews.apache.org/r/58720/#comment249131>

    Oh, I think we can use same function as container_exists() to avoid code copy-paste. And
use lambda to make logical 'not':
    
    container_does_not_exist = lambda data: not container_exists(data)



src/cli_new/lib/cli/tests/tests.py
Lines 60 (patched)
<https://reviews.apache.org/r/58720/#comment249132>

    Consider using lambda function 'command' here.


- Andrei Budnik


On May 8, 2017, 5:27 p.m., Armand Grillet wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58720/
> -----------------------------------------------------------
> 
> (Updated May 8, 2017, 5:27 p.m.)
> 
> 
> Review request for mesos and Kevin Klues.
> 
> 
> Bugs: MESOS-7283
>     https://issues.apache.org/jira/browse/MESOS-7283
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This infrastructure includes the ability to bring up a test cluster to
> run the CLI against. Future unit tests will use this infrastructure to
> test their commands against a running mesos cluster. The tests require
> some binaries created when building Mesos.
> 
> 
> Diffs
> -----
> 
>   src/cli_new/lib/cli/__init__.py f4fc3f18af5641a4a87143adaba81e62334ccffb 
>   src/cli_new/lib/cli/tests/__init__.py PRE-CREATION 
>   src/cli_new/lib/cli/tests/base.py PRE-CREATION 
>   src/cli_new/lib/cli/tests/constants.py PRE-CREATION 
>   src/cli_new/lib/cli/tests/tests.py PRE-CREATION 
>   src/cli_new/pip-requirements.txt 28613e56a5c6d5c7606a7e58d6125b0c34748e83 
>   src/cli_new/tests/main.py dff5d48b0ddae87960a78f9d05e4ae597912f1f6 
> 
> 
> Diff: https://reviews.apache.org/r/58720/diff/6/
> 
> 
> Testing
> -------
> 
> PEP8 and Pylint used to make sure that the code style is correct. Manuel test:
> 
> $ cd src/cli_new
> $ ./bootstrap
> $ source activate
> 
> (mesos-cli) $ mesos-cli-tests
> 
> 
> Thanks,
> 
> Armand Grillet
> 
>


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