You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by "jiraposter@reviews.apache.org (JIRA)" <ji...@apache.org> on 2012/05/01 01:07:49 UTC
[jira] [Commented] (MESOS-93) Add unit tests for webui
[ https://issues.apache.org/jira/browse/MESOS-93?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13265488#comment-13265488 ]
jiraposter@reviews.apache.org commented on MESOS-93:
----------------------------------------------------
-----------------------------------------------------------
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:
bq.
bq. -----------------------------------------------------------
bq. This is an automatically generated e-mail. To reply, visit:
bq. https://reviews.apache.org/r/4823/
bq. -----------------------------------------------------------
bq.
bq. (Updated 2012-04-30 00:52:34)
bq.
bq.
bq. Review request for mesos and Charles Reiss.
bq.
bq.
bq. Summary
bq. -------
bq.
bq. Python Testcases for webui
bq.
bq. *added unit testcases for checking if the webui could break by inputing artificial test jsons
bq. *should catch bugs if there syntax issues, or general cases where resources doesn't add up correctly
bq. *moved most of the logic out of the bottle .tpl template file and into the common webui_lib.py
bq.
bq.
bq. This addresses bug MESOS-93.
bq. https://issues.apache.org/jira/browse/MESOS-93
bq.
bq.
bq. Diffs
bq. -----
bq.
bq. src/webui/tests/testcases.pyc PRE-CREATION
bq. src/webui/tests/run_testcases.sh PRE-CREATION
bq. src/webui/tests/testcases.py PRE-CREATION
bq. src/webui/slave/index.tpl b2e2097
bq. src/webui/tests/run_testcases.py PRE-CREATION
bq. src/webui/slave/executor.tpl dd53464
bq. src/webui/slave/framework.tpl 9488da5
bq. src/webui/master/framework.tpl b29d2da
bq. src/webui/master/index.tpl 68ae313
bq. src/Makefile.am cd503a8
bq. src/webui/common/webui_lib.py 0c56fde
bq.
bq. Diff: https://reviews.apache.org/r/4823/diff
bq.
bq.
bq. Testing
bq. -------
bq.
bq.
bq. Thanks,
bq.
bq. terencekwt
bq.
bq.
> Add unit tests for webui
> ------------------------
>
> Key: MESOS-93
> URL: https://issues.apache.org/jira/browse/MESOS-93
> Project: Mesos
> Issue Type: Improvement
> Components: test, webui
> Reporter: Charles Reiss
> Assignee: Terence Tam
> Labels: test, webui
>
> The WebUI should have unit tests. Ideally, these tests should mock out the Master and Slave entirely and thus be pure python tests.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira