scripts/startstop_node.py is not tested directly, so can't see coverage #1148

Open
opened 2010-08-02 19:03:48 +00:00 by davidsarah · 4 comments
davidsarah commented 2010-08-02 19:03:48 +00:00
Owner

(http://tahoe-lafs.org/codecoverage/tahoe-lafs/zomp/htmlcov-allmydata-tahoe-1.7.1-r4630/src_allmydata_scripts_startstop_node.html)

The runner tests do start and stop nodes, but they do so by invoking the CLI in a separate process, so it's not possible to see in the coverage reports which parts of the code are tested.

(http://tahoe-lafs.org/codecoverage/tahoe-lafs/zomp/htmlcov-allmydata-tahoe-1.7.1-r4630/src_allmydata_scripts_startstop_node.html) The runner tests do start and stop nodes, but they do so by invoking the CLI in a separate process, so it's not possible to see in the coverage reports which parts of the code are tested.
tahoe-lafs added the
code-nodeadmin
minor
defect
1.7.1
labels 2010-08-02 19:03:48 +00:00
tahoe-lafs added this to the soon milestone 2010-08-02 19:03:48 +00:00
warner commented 2010-11-27 09:38:46 +00:00
Author
Owner

this ought to be fixed by the recent import+call+twistd.run() change

this ought to be fixed by the recent import+call+twistd.run() change
davidsarah commented 2010-11-27 20:29:51 +00:00
Author
Owner

Replying to warner:

this ought to be fixed by the recent import+call+twistd.run() change

That change only removes one level of subprocess invocation. The test itself invokes bin/tahoe as a subprocess (and has to do so in order to avoid consuming the test process). There is also the daemonization on Unix.

Mocking twistd.run would solve the problem of consuming the test process; then you could call the start/stop/restart commands in the same way as the other CLI tests.

Replying to [warner](/tahoe-lafs/trac-2024-07-25/issues/1148#issuecomment-120686): > this ought to be fixed by the recent import+call+twistd.run() change That change only removes one level of subprocess invocation. The test itself invokes `bin/tahoe` as a subprocess (and has to do so in order to avoid consuming the test process). There is also the daemonization on Unix. Mocking `twistd.run` would solve the problem of consuming the test process; then you could call the start/stop/restart commands in the same way as the other CLI tests.
tahoe-lafs modified the milestone from soon to 1.9.0 2010-11-28 01:07:25 +00:00
davidsarah commented 2010-11-28 01:12:24 +00:00
Author
Owner

Replying to [davidsarah]comment:2:

... There is also the daemonization on Unix.

... but that's not relevant to testing coverage of startstop_node.py.

Replying to [davidsarah]comment:2: > ... There is also the daemonization on Unix. ... but that's not relevant to testing coverage of `startstop_node.py`.
tahoe-lafs modified the milestone from 1.9.0 to soon 2011-05-28 19:37:45 +00:00
Brian Warner <warner@lothar.com> commented 2017-09-19 17:20:49 +00:00
Author
Owner

In 04b34b6/trunk:

Merge PR417: rewrite tahoe start/stop/daemonize

* refs ticket:1148 (splits up startstop_node, improves coverage)
* refs ticket:275 ('start' probably doesn't exit until furl is written)
* refs ticket:1121 (probably improves coverage)
* refs ticket:1377 (probably fixed)
* refs ticket:2149 (might influence, probably won't fix)
* refs ticket:719 (probably improved)
In [04b34b6/trunk](/tahoe-lafs/trac-2024-07-25/commit/04b34b6fd2bb112942d2cb8ea41ef11ee4c72347): ``` Merge PR417: rewrite tahoe start/stop/daemonize * refs ticket:1148 (splits up startstop_node, improves coverage) * refs ticket:275 ('start' probably doesn't exit until furl is written) * refs ticket:1121 (probably improves coverage) * refs ticket:1377 (probably fixed) * refs ticket:2149 (might influence, probably won't fix) * refs ticket:719 (probably improved) ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: tahoe-lafs/trac-2024-07-25#1148
No description provided.