[
https://issues.apache.org/jira/browse/MESOS-93?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13258580#comment-13258580
]
[email protected] commented on MESOS-93:
----------------------------------------------------
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4823/#review7091
-----------------------------------------------------------
General issues:
- We don't seem to have an official Python style guide (oops?), but try to
follow some approximation of the Google python style guide but with 2-space
indent (as this seems to be roughly what other python files use). In
particular, this means: wrap lines of more than 80 chars; blank line between
methods in classes; two blank lines before top-level declarations
- Move tests to src/webui/tests or src/tests/webui
- Add a script that runs the tests, and it as a test with if WEBUI \ TESTS +=
<the script> \ endif -or-
- Add all new files to EXTRA_DIST (or another automake-managed target) in
Makefile.am (look at how other test files are currently added). When you're
done 'make distcheck' from the top-level (warning: takes a long time) should
not fail.
src/webui/common/run_testcases.py
<https://reviews.apache.org/r/4823/#comment15700>
Why?
src/webui/common/run_testcases.py
<https://reviews.apache.org/r/4823/#comment15694>
Try TestMaster or similar (unless you've integrated a coverage analysis).
src/webui/common/run_testcases.py
<https://reviews.apache.org/r/4823/#comment15697>
Include the exception with the failure or rethrow it (and elsewhere).
src/webui/common/testcases.py
<https://reviews.apache.org/r/4823/#comment15695>
Shouldn't we use a string literal that might be returned by the master?
src/webui/common/webui_lib.py
<https://reviews.apache.org/r/4823/#comment15696>
I'm guessing this won't handle daylight saving transitions correctly.
src/webui/master/index.tpl
<https://reviews.apache.org/r/4823/#comment15701>
Move logic so we can do framework['max_share']
- Charles
On 2012-04-20 08:36:23, 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-20 08:36:23)
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/common/run_testcases.py PRE-CREATION
bq. src/webui/common/testcases.py PRE-CREATION
bq. src/webui/common/webui_lib.py 0c56fde
bq. src/webui/master/framework.tpl b29d2da
bq. src/webui/master/index.tpl 68ae313
bq. src/webui/slave/executor.tpl dd53464
bq. src/webui/slave/framework.tpl 9488da5
bq. src/webui/slave/index.tpl b2e2097
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