You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Charles Reiss <wo...@gmail.com> on 2012/05/01 01:06:54 UTC

Re: Review Request: Python Testcases for Webui

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



src/Makefile.am
<https://reviews.apache.org/r/4823/#comment16304>

    Remove trailing whitespace (and elsewhere in this file)



src/Makefile.am
<https://reviews.apache.org/r/4823/#comment16307>

    Even if this order works, move WEBUI_TESTS = before the TESTS +=



src/Makefile.am
<https://reviews.apache.org/r/4823/#comment16308>

    I assume you meant run_testcases.sh?



src/webui/tests/run_testcases.py
<https://reviews.apache.org/r/4823/#comment16310>

    Shouldn't you make a test suite? Also, can we run the tests using unittest's command-line interface ( http://docs.python.org/library/unittest.html#command-line-interface )



src/webui/tests/run_testcases.sh
<https://reviews.apache.org/r/4823/#comment16309>

    Use TESTS_ENVIRONMENT to pass $(PYTHON) from src/Makefile.am and use that here. (We should support configuring Mesos to use a version of Python other than the one that is first on the PATH.)



src/webui/tests/testcases.py
<https://reviews.apache.org/r/4823/#comment16305>

    Pass this (and other long JSON strings in this file) through a JSON pretty printer (so it uses multiple lines in a natural way) and use """-quotes. Then, the test case should be human readable/editable. (I also wouldn't object to forming the JSON string programmatically from the parsed version, so long as the test gets a string.)


- Charles


On 2012-04-30 00:52:34, terencekwt wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/4823/
> -----------------------------------------------------------
> 
> (Updated 2012-04-30 00:52:34)
> 
> 
> Review request for mesos and Charles Reiss.
> 
> 
> Summary
> -------
> 
> Python Testcases for webui
> 
> *added unit testcases for checking if the webui could break by inputing artificial test jsons
> *should catch bugs if there syntax issues, or general cases where resources doesn't add up correctly
> *moved most of the logic out of the bottle .tpl template file and into the common webui_lib.py
> 
> 
> This addresses bug MESOS-93.
>     https://issues.apache.org/jira/browse/MESOS-93
> 
> 
> Diffs
> -----
> 
>   src/webui/tests/testcases.pyc PRE-CREATION 
>   src/webui/tests/run_testcases.sh PRE-CREATION 
>   src/webui/tests/testcases.py PRE-CREATION 
>   src/webui/slave/index.tpl b2e2097 
>   src/webui/tests/run_testcases.py PRE-CREATION 
>   src/webui/slave/executor.tpl dd53464 
>   src/webui/slave/framework.tpl 9488da5 
>   src/webui/master/framework.tpl b29d2da 
>   src/webui/master/index.tpl 68ae313 
>   src/Makefile.am cd503a8 
>   src/webui/common/webui_lib.py 0c56fde 
> 
> Diff: https://reviews.apache.org/r/4823/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> terencekwt
> 
>


Re: Review Request: Python Testcases for Webui

Posted by te...@berkeley.edu.

> On 2012-04-30 23:06:54, Charles Reiss wrote:
> > src/Makefile.am, line 718
> > <https://reviews.apache.org/r/4823/diff/2/?file=105472#file105472line718>
> >
> >     I assume you meant run_testcases.sh?

I actually meant run_testcases.py, as i added the #!usr/bin/env python in the beginning of the .py file. Will that also need to use the TESTS_ENVIRONMENT passing $(PYTHON) from src/Makefile.am?


- terencekwt


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


On 2012-04-30 00:52:34, terencekwt wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/4823/
> -----------------------------------------------------------
> 
> (Updated 2012-04-30 00:52:34)
> 
> 
> Review request for mesos and Charles Reiss.
> 
> 
> Summary
> -------
> 
> Python Testcases for webui
> 
> *added unit testcases for checking if the webui could break by inputing artificial test jsons
> *should catch bugs if there syntax issues, or general cases where resources doesn't add up correctly
> *moved most of the logic out of the bottle .tpl template file and into the common webui_lib.py
> 
> 
> This addresses bug MESOS-93.
>     https://issues.apache.org/jira/browse/MESOS-93
> 
> 
> Diffs
> -----
> 
>   src/webui/tests/testcases.pyc PRE-CREATION 
>   src/webui/tests/run_testcases.sh PRE-CREATION 
>   src/webui/tests/testcases.py PRE-CREATION 
>   src/webui/slave/index.tpl b2e2097 
>   src/webui/tests/run_testcases.py PRE-CREATION 
>   src/webui/slave/executor.tpl dd53464 
>   src/webui/slave/framework.tpl 9488da5 
>   src/webui/master/framework.tpl b29d2da 
>   src/webui/master/index.tpl 68ae313 
>   src/Makefile.am cd503a8 
>   src/webui/common/webui_lib.py 0c56fde 
> 
> Diff: https://reviews.apache.org/r/4823/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> terencekwt
> 
>