http://hg.code.sf.net:8000/p/roundup/code/atom-log/tip/test/test_admin.py Mercurial Repository: p/roundup/code: test/test_admin.py history 2026-04-08T21:39:40-04:00 chore: remove __future print_funcion from code. http://hg.code.sf.net:8000/p/roundup/code/#changeset-9c3ec0a5c7fc88acb8a65632ecc13b2d52380314 John Rouillard rouilj@ieee.org 2026-04-08T21:39:40-04:00 2026-04-08T21:39:40-04:00
changeset 9c3ec0a5c7fc
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description chore: remove __future print_funcion from code.

Not needed as of Python 3.
files
bug, refactor, test: make pragma history_length work interactively http://hg.code.sf.net:8000/p/roundup/code/#changeset-254f70dfc5856d142ecbc7a7c31c59d75c625f08 John Rouillard rouilj@ieee.org 2025-08-31T20:59:04-04:00 2025-08-31T20:59:04-04:00
changeset 254f70dfc585
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description bug, refactor, test: make pragma history_length work interactively

history_length could be set interactively, but it was never used to set
readline/pyreadline3's internal state. Using the pragma setting on the
roundup-admin command line did set readline's state.

Also refactored 2 calls to self.readline.get_current_history_length()
into one call and storing in a variable. Also changed method for
creating history strings for printing.

Tests added for history_length pragma on cli and interactive use.

Added test for exiting roundup-admin with EOF on input.

Added test for 'readline nosuchdirective' error case.

Added test to readline with a command directive to set an internal
variable. This last one has no real test to see if it was successful
because I can't emulate a real keyboard/tty which is needed to test.
files
feat: add support for ! history and readline command in roundup-admin http://hg.code.sf.net:8000/p/roundup/code/#changeset-3bdae15252c65b87f524942af3e1d019896295e1 John Rouillard rouilj@ieee.org 2025-08-31T16:54:17-04:00 2025-08-31T16:54:17-04:00
changeset 3bdae15252c6
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description feat: add support for ! history and readline command in roundup-admin

Ad support to change input mode emacs/vi using new 'readline'
roundup-admin command. Also bind keys to command/input strings, List
numbered history and allow rerunning a command with !<number> or allow
user to edit it using !<number>:p.

admin_guide.txt:
Added docs.

admin.py:

add functionality. Reconcile import commands to standard. Replace
IOError with FileNotFoundError no that we have removed python 2.7
support. Add support for identifying backend used to supply line
editing/history functions. Add support for saving commands sent on
stdin to history to allow preloading of history.

test_admin.py:

Test code. Can't test mode changes as lack of pty when driving command
line turns off line editing in readline/pyreadline3. Similarly can't
test key bindings/settings.

Some refactoring of test conditions that had to change because of
additional output reporting backend library.
files
feat: add 'q' as alias to quit to exit interactive roundup-admin http://hg.code.sf.net:8000/p/roundup/code/#changeset-1a93dc58f97529a96a14e3973a1589870a82b726 John Rouillard rouilj@ieee.org 2025-08-26T23:37:42-04:00 2025-08-26T23:37:42-04:00
changeset 1a93dc58f975
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description feat: add 'q' as alias to quit to exit interactive roundup-admin

Also require no arguments to 'q', 'quit' or 'exit' before exiting.
Now typing 'quit a' will get an unknown command error.

Add to admin-guide how to get out of interactive mode.

Also test 'q' and 'exit' commands.

No upgrading docs added. Not that big a feature. Just noted in
CHANGES. Reporting error if argument provided is unlikely to be an
issue IMO, so no upgrading.txt entry.
files
test: fix failing test setup for change in PBKDF2 rounds. http://hg.code.sf.net:8000/p/roundup/code/#changeset-b4ad03927711c6a5c34f68d1313da5537565ccc6 John Rouillard rouilj@ieee.org 2024-12-30T21:03:01-05:00 2024-12-30T21:03:01-05:00
changeset b4ad03927711
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description test: fix failing test setup for change in PBKDF2 rounds.
files
[permission-performance] Change permission representation http://hg.code.sf.net:8000/p/roundup/code/#changeset-c12377fb4144e63ba869fd0d85ea37b269af1b7a Ralf Schlatterbeck rsc@runtux.com 2024-10-18T16:52:42+02:00 2024-10-18T16:52:42+02:00
changeset c12377fb4144
branch permission-performance
bookmark
tag
user Ralf Schlatterbeck <rsc@runtux.com>
description Change permission representation

Now permissions are checked in different order. Permissions without a
check method (which are cheap to check) are checked first. Only if no
permission is found do we check permissions with check methods.
files
test: fix path issues posix vs windows in admin functions. http://hg.code.sf.net:8000/p/roundup/code/#changeset-23b7669b2f487246ff6b0bfa32f8b4f3b4a4e73e John Rouillard rouilj@ieee.org 2024-04-18T19:53:50-04:00 2024-04-18T19:53:50-04:00
changeset 23b7669b2f48
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description test: fix path issues posix vs windows in admin functions.
files
test: fix test to change in message. http://hg.code.sf.net:8000/p/roundup/code/#changeset-fe77e432508414824f49f28375876ac10de57c63 John Rouillard rouilj@ieee.org 2024-04-08T13:14:57-04:00 2024-04-08T13:14:57-04:00
changeset fe77e4325084
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description test: fix test to change in message.

Prior commit changed message to make it match the newly added message.
Fix the test.
files
fix: disable history file changes when testing http://hg.code.sf.net:8000/p/roundup/code/#changeset-2746337ded4cd6641fe30a46428532ac1d847b20 John Rouillard rouilj@ieee.org 2024-03-13T13:11:38-04:00 2024-03-13T13:11:38-04:00
changeset 2746337ded4c
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description fix: disable history file changes when testing

Found more places that were blowing up the history
file size to MB. Disabled writing to the history file for
all tests.
files
feat: add support for controlling readline history features http://hg.code.sf.net:8000/p/roundup/code/#changeset-7c0a8088b053891acfee65ecbbd9b7c151ebc604 John Rouillard rouilj@ieee.org 2024-03-13T12:18:36-04:00 2024-03-13T12:18:36-04:00
changeset 7c0a8088b053
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description feat: add support for controlling readline history features

You can disable loading or saving the history file and disable loading
the readline rc file. This is controlled by pragma history_features
which is a bit string. Setting a bit disables the feature.

Also cleaned up a python traceback if an invalid pragma was specified
on the command line. Just displays an error message and drops into
interactive mode.

I had a hand when running regression tests with
tet-admin.py::testBasicInteractive. It was loading the history file
and saving the commands making the file huge. So disable all
history_features by default when testing by setting pragma to 7.
files
fix(refactor): multiple fixups using ruff linter; more testing. http://hg.code.sf.net:8000/p/roundup/code/#changeset-b2dbab2b34bce7223c4369f85f2f358a10959d3f John Rouillard rouilj@ieee.org 2024-03-01T14:53:18-05:00 2024-03-01T14:53:18-05:00
changeset b2dbab2b34bc
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description fix(refactor): multiple fixups using ruff linter; more testing.

Converting to using the ruff linter and its rulesets. Fixed a number
of issues.

admin.py:

sort imports

use immutable tuples as default value markers for parameters where a
None value is valid.

reduced some loops to list comprehensions for performance

used ternary to simplify some if statements

named some variables to make them less magic
(e.g. _default_savepoint_setting = 1000)

fixed some tests for argument counts < 2 becomes != 2 so 3 is an
error.

moved exception handlers outside of loops for performance where
exception handler will abort loop anyway.

renamed variables called 'id' or 'dir' as they shadow builtin
commands.

fix translations of form _("string %s" % value) -> _("string %s") %
value so translation will be looked up with the key before
substitution.

end dicts, tuples with a trailing comma to reduce missing comma
errors if modified

simplified sorted(list(self.setting.keys())) to
sorted(self.setting.keys()) as sorted consumes whole list.

in if conditions put compared variable on left and threshold condition
on right. (no yoda conditions)

multiple noqa: suppression

removed unneeded noqa as lint rulesets are a bit different

do_get - refactor output printing logic: Use fast return if not
special formatting is requested; use isinstance with a tuple
rather than two isinstance calls; cleaned up flow and removed
comments on algorithm as it can be easily read from the code.

do_filter, do_find - refactor output printing logic. Reduce
duplicate code.

do_find - renamed variable 'value' that was set inside a loop. The
loop index variable was also named 'value'.

do_pragma - added hint to use list subcommand if setting was not
found. Replaced condition 'type(x) is bool' with 'isinstance(x,
bool)' for various types.

test_admin.py

added testing for do_list

better test coverage for do_get includes: -S and -d for multilinks,
error case for -d with non-link.

better testing for do_find including all output modes

better testing for do_filter including all output modes

fixed expected output for do_pragma that now includes hint to use
pragma list if setting not found.
files
bug: Fix roundup-admin security command. Lowercase optionalarg. http://hg.code.sf.net:8000/p/roundup/code/#changeset-4de48eadf5f4eb792ef84b1188800b273fe33f49 John Rouillard rouilj@ieee.org 2023-10-06T09:53:22-04:00 2023-10-06T09:53:22-04:00
changeset 4de48eadf5f4
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description bug: Fix roundup-admin security command. Lowercase optionalarg.

Roles are indexed by lower case role name. So 'security User' and
'security user' should generate the same output. Also add testing for
this case.

Thread:

https://sourceforge.net/p/roundup/mailman/roundup-users/thread/CAH-41398iTPhze7D_pZB8tqTBHF%3Dq6HYonbcG%2B%2BYN-ioDssXBw%40mail.gmail.com/#msg41557225

starting from:
https://sourceforge.net/p/roundup/mailman/message/41557225/
files
test: limit search for \r to first 100 bytes. http://hg.code.sf.net:8000/p/roundup/code/#changeset-859c57bc8d9189fef8064ae4b263296731b51d60 John Rouillard rouilj@ieee.org 2023-07-24T21:24:07-04:00 2023-07-24T21:24:07-04:00
changeset 859c57bc8d91
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description test: limit search for \r to first 100 bytes.

Don't scan entire file. just look at 100 bytes which should include
all of the first line.
files
test: fix failure under cygwin python caused by line endings http://hg.code.sf.net:8000/p/roundup/code/#changeset-227aca44fea5a7d194dc8b19a719d92595f04f51 John Rouillard rouilj@ieee.org 2023-07-24T21:16:41-04:00 2023-07-24T21:16:41-04:00
changeset 227aca44fea5
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description test: fix failure under cygwin python caused by line endings

reading config.ini files under cygwin python results in \r\n
terminated lines which do not compare properly with the success
conditions.

replace \r\n with \n when required.
files
fix: issue2551193 - Fix roundup for removal of cgi and cgitb ... http://hg.code.sf.net:8000/p/roundup/code/#changeset-978285986b2c9d73f4a39d745ab6a3bbab58af3d John Rouillard rouilj@ieee.org 2023-07-24T17:49:58-04:00 2023-07-24T17:49:58-04:00
changeset 978285986b2c
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description fix: issue2551193 - Fix roundup for removal of cgi and cgitb ...

standard python modules (and FieldStorage/MiniFieldStorage).

Vendor cgi.py and modify imports.

Details:

roundup/anypy/cgi_.py
import that accesses a working cgi.py. All imports dealing with cgi
now use cgi_.

roundup/anypy/vendored/cgi.py
vendored version 2.6 of cgi.py from:
https://pypi.org/project/legacy-cgi/

CHANGES.txt
change note added

COPYING.txt
added license for cgi.py

doc/rest.txt
change example to use cgi_

doc/upgrading.txt
doc removal and how to rework local code using cgi.py.

frontends/roundup.cgi
remove unneeded cgi import

roundup/cgi/actions.py
roundup/cgi/apache.py
roundup/cgi/client.py
roundup/cgi/templating.py
roundup/cgi/TAL/TALGenerator.py
test/db_test_base.py
test/rest_common.py
test/test_cgi.py
remove import cgi and replace with from roundup.anypy.cgi_ import
cgi

test/test_actions.py
test/test_templating.py
modify import to get *FieldStorage

test/test_admin.py
test/test_hyperdbvals.py
test/test_xmlrpc.py
remove unneeded cgi import
files
issue685275 - show retired/unretired items in roundup-admin http://hg.code.sf.net:8000/p/roundup/code/#changeset-73dfa9df9fb08618e72479ec013d48ffac0427c7 John Rouillard rouilj@ieee.org 2023-07-14T22:07:23-04:00 2023-07-14T22:07:23-04:00
changeset 73dfa9df9fb0
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description issue685275 - show retired/unretired items in roundup-admin

add pragma display_header to print headers for display command. Header
displays designator and retired/active status.

Add doc of pragma to affected commands.

Add test for code paths.
files
Fix test where postgres returned items in different order http://hg.code.sf.net:8000/p/roundup/code/#changeset-793f4b63c5386a6f58b7620b0642113e5f7747d6 John Rouillard rouilj@ieee.org 2023-07-14T21:56:27-04:00 2023-07-14T21:56:27-04:00
changeset 793f4b63c538
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description Fix test where postgres returned items in different order
files
issue685275 - show retired/unretire commands http://hg.code.sf.net:8000/p/roundup/code/#changeset-c8c4514f4c3e809991bc419a330900a5e9d5ddd5 John Rouillard rouilj@ieee.org 2023-07-14T20:34:30-04:00 2023-07-14T20:34:30-04:00
changeset c8c4514f4c3e
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description issue685275 - show retired/unretire commands

For roundup-admin, add pragma show_retired [no, only, both] to control
showing retired items in list and table commands:

no - do not show retired
only - only show retired
both - show retired and unretired (active) items

Also sort results of Class::getnodeids() in back_anydbm.py. Anydbm
Class::list() expicitly sorts the returned values and a test depends
on the order of the returned items.

I can't find any docs that say Class::list() sorts and there is no
explicit sort in the rdbms_common.py implementation. It looks like
the natural order returned in the rdbms case for these methods is
sorted.

However the test fails for the anydbm case if I don't sort the results
of back_anydbm.py:Class::getnodeids() to match
back_anydbm.py:Class::list().

This also fixes a spelling error in comment.
files
Add -P pragma=value command line option to roundup-admin. http://hg.code.sf.net:8000/p/roundup/code/#changeset-534f8bdb8f943a61056d14d62e53c681b50f2204 John Rouillard rouilj@ieee.org 2023-07-14T00:30:44-04:00 2023-07-14T00:30:44-04:00
changeset 534f8bdb8f94
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description Add -P pragma=value command line option to roundup-admin.

To set pragmas when using non-interactive mode, or set on command line
when going into interactive mode.

Also changed specification test to use command line pragma setting
rather than interactive. This tests the -P option without having to
run an extra test.

Docs updated as well.
files
- issue2551103 - add pragma 'display_protected' to roundup-admin. http://hg.code.sf.net:8000/p/roundup/code/#changeset-fc9daba984c02230c8b5f91eda776cdb1f3086a3 John Rouillard rouilj@ieee.org 2023-07-13T23:47:43-04:00 2023-07-13T23:47:43-04:00
changeset fc9daba984c0
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description - issue2551103 - add pragma 'display_protected' to roundup-admin.

If setting is true, print protected attributes like id, activity,
actor... when using display or specification subcommands.
files
- issue2551190 - Allow roundup-admin reindex to work in batches. http://hg.code.sf.net:8000/p/roundup/code/#changeset-312d52305583653240391f70b8ceeb72963cb95f John Rouillard rouilj@ieee.org 2023-05-24T12:13:05-04:00 2023-05-24T12:13:05-04:00
changeset 312d52305583
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description - issue2551190 - Allow roundup-admin reindex to work in batches.

Running:

roundup-admin -i ... reindex issue:1-1000

will reindex the first 1000 issues while reporting any missing issues
in the range.

Also completion progress is reported when indexing a specific class.

Note this require a chnge that makes an invalid command like:

reindex issue23f

to error with no such class issue23f. It used to reindex
issue23 which I consider a bug.

Updates to man page admin_guide.py.

Tests added.
files
Fix test failure caused by making genconfig trackerless http://hg.code.sf.net:8000/p/roundup/code/#changeset-bd6523c84a95c83e9079c84fdebc0c4ea34a6bf6 John Rouillard rouilj@ieee.org 2023-05-24T11:25:47-04:00 2023-05-24T11:25:47-04:00
changeset bd6523c84a95
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description Fix test failure caused by making genconfig trackerless

When I removed the need to have a tracker for genconfig, I broke a
couple of tests. The breakage was hidden by a bad workflow.

This change allows the tests to pass and refactors reporting of
UsageError exceptions in admin.py.

It also adds a test for failure in install command as there is a test
case for it and this test tests the refactor.
files
add test for pragma _reopen_tracker http://hg.code.sf.net:8000/p/roundup/code/#changeset-af870e295b46fc995c4c5161e1116232f859b39a John Rouillard rouilj@ieee.org 2023-04-12T21:02:28-04:00 2023-04-12T21:02:28-04:00
changeset af870e295b46
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description add test for pragma _reopen_tracker

missed committing it with the code change.

Note _reopen_tracker is a negative feature flag. It should go away if
nobody reports an error with the new tracker open caching code path.
files
add pragma command to roundup-admin http://hg.code.sf.net:8000/p/roundup/code/#changeset-9c067ed4568b4be89e63f713d3f054c55a43f510 John Rouillard rouilj@ieee.org 2023-04-12T20:49:21-04:00 2023-04-12T20:49:21-04:00
changeset 9c067ed4568b
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description add pragma command to roundup-admin

Added basic pragma command. Can assign settings, list settings.
Most settings are not yet implemented.

Only the pragma command respects unhidden pragma settings at this
point. Also added tests, doc updates for roundup-admin.

CHANGES.txt not updated because currently only pragma references the
unhidden settings.

Also fixed a couple of long lines.
files
Fix for python2. m[0] -> m.group(0) http://hg.code.sf.net:8000/p/roundup/code/#changeset-1a3d4703c7d6f2dca48788eab90018efb1e09594 John Rouillard rouilj@ieee.org 2023-03-01T13:04:54-05:00 2023-03-01T13:04:54-05:00
changeset 1a3d4703c7d6
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description Fix for python2. m[0] -> m.group(0)
files
Add missing space in message; add tests; update .po http://hg.code.sf.net:8000/p/roundup/code/#changeset-ccb0e566e0bef1cfc8a9e41053e700a61c763b37 John Rouillard rouilj@ieee.org 2023-03-01T12:56:36-05:00 2023-03-01T12:56:36-05:00
changeset ccb0e566e0be
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description Add missing space in message; add tests; update .po

Testing for updateconfig updating password_pbkdf2_default_rounds.
Added missing space in one message and updated locale files as a
result.
files
Add testing interactive mode to roundup_admin. remove redundant imports http://hg.code.sf.net:8000/p/roundup/code/#changeset-0c6617db0b9740117cd2f0d039063af2fab1ca0b John Rouillard rouilj@ieee.org 2023-02-26T13:34:14-05:00 2023-02-26T13:34:14-05:00
changeset 0c6617db0b97
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description Add testing interactive mode to roundup_admin. remove redundant imports
files
Remove unneded import. http://hg.code.sf.net:8000/p/roundup/code/#changeset-43a0c29015243a6ac9e004c0013173dec3e62d34 John Rouillard rouilj@ieee.org 2023-02-25T17:07:38-05:00 2023-02-25T17:07:38-05:00
changeset 43a0c2901524
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description Remove unneded import.
files
check trackers trace_search as well. http://hg.code.sf.net:8000/p/roundup/code/#changeset-e54a2db40a9e9217bd3f21bd77da54980de2aed7 John Rouillard rouilj@ieee.org 2022-09-12T19:25:00-04:00 2022-09-12T19:25:00-04:00
changeset e54a2db40a9e
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description check trackers trace_search as well.
files
issue2551233 - create new roundup-admin command "templates" http://hg.code.sf.net:8000/p/roundup/code/#changeset-f924af12ef50d1b1d81bb47136e45803db87031c John Rouillard rouilj@ieee.org 2022-09-12T18:29:50-04:00 2022-09-12T18:29:50-04:00
changeset f924af12ef50
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description issue2551233 - create new roundup-admin command "templates"

add a command to list all templates, the directory where they are
defined, and a description.

If called as templates trace_dir also list all directores that are
search for templates even if none are found.
files
issue2551141 - roundup-admin returns no such class when restoring item with duplicate key http://hg.code.sf.net:8000/p/roundup/code/#changeset-ff4ab763f47c5e74dcd52e0334813352364606b2 John Rouillard rouilj@ieee.org 2021-06-05T23:43:42-04:00 2021-06-05T23:43:42-04:00
changeset ff4ab763f47c
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description issue2551141 - roundup-admin returns no such class when restoring item with duplicate key

Fix the error by splitting the class name lookup and the restore
opertation. Both can return KeyErrors. Set up two different try
blocks for each case. Also test restore/retire.
files
- issue2551062: AddPermission doesn't validate property names. http://hg.code.sf.net:8000/p/roundup/code/#changeset-51a1a9b0f567e057b9f41fd6e541e219f662334c John Rouillard rouilj@ieee.org 2021-05-06T18:56:47-04:00 2021-05-06T18:56:47-04:00
changeset 51a1a9b0f567
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description - issue2551062: AddPermission doesn't validate property names.

roundup-admin security stops output when it finds an invalid
property. It used to try to print the rest of the security
properties. So errors were lost in the output.

If roundup-admin is run non-interactively it exits with status 1
so it can be used in a script to validate the properties schema.
files
Use server-side cursor for postgres in some cases http://hg.code.sf.net:8000/p/roundup/code/#changeset-6a6b4651be1f53bd98ce5c430c3bf9c355da4fb9 Ralf Schlatterbeck rsc@runtux.com 2021-03-04T12:55:21+01:00 2021-03-04T12:55:21+01:00
changeset 6a6b4651be1f
branch
bookmark
tag
user Ralf Schlatterbeck <rsc@runtux.com>
description Use server-side cursor for postgres in some cases

In filter, filter_iter, and _materialize_multilinks, use named cursor
with postgresql. This turns of client-side cursor handling and avoids
*large* roundup process (or wsgi process) in case of large results.
Fixes issue2551114.
files
Test designator code path http://hg.code.sf.net:8000/p/roundup/code/#changeset-b303db7f384f5c5f24dad469f2bdea5dd81726d2 John Rouillard rouilj@ieee.org 2020-08-05T12:22:06-04:00 2020-08-05T12:22:06-04:00
changeset b303db7f384f
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description Test designator code path

Added -d to a test to output designator rather than just id numbers.
Improves test coverage.
files
issue2550522 - add transitive searching to filter in roundup-admin http://hg.code.sf.net:8000/p/roundup/code/#changeset-95183d73ac647c028f6eee2b600cf74d82d79f40 John Rouillard rouilj@ieee.org 2020-08-05T02:05:10-04:00 2020-08-05T02:05:10-04:00
changeset 95183d73ac64
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description issue2550522 - add transitive searching to filter in roundup-admin

issue2550522 - Add 'filter' command to command-line interface.

Filter command was actually added in 2.0.0, but this
issue requested transitive searching. So that:

roundup-admin -i . filter issue assignedto.username=Admin

will work. This also fixes two bugs.

If assignedto.username had no matches, all issues would be returned.

admin.py had a find() call where the should have been a filter()
call. Was tripped when -S, -c or -s were used.
files
admin.py testing. http://hg.code.sf.net:8000/p/roundup/code/#changeset-e860c6a305088d18736e1dc82d3ba6c2f8f5e0bd John Rouillard rouilj@ieee.org 2020-06-13T00:19:38-04:00 2020-06-13T00:19:38-04:00
changeset e860c6a30508
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description admin.py testing.

See previous checkin for admin.py. This got left out of the
changeset apparently.

test_admin.py:

Add tests for get with bad node designator

Add disabled test for HelpInitopts. Proper test TBD as valid result
depends on the environment the test is run in. So making it
robust it tricky.

Add tests for set error cases.

Add test for using set on class rather than designator

Add new tests for table command
files
Use self.dirname, add testing for genconfig/updateconfig http://hg.code.sf.net:8000/p/roundup/code/#changeset-7458211ca6f3541718a527ab7997831e7f9924f7 John Rouillard rouilj@ieee.org 2020-06-07T18:10:51-04:00 2020-06-07T18:10:51-04:00
changeset 7458211ca6f3
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description Use self.dirname, add testing for genconfig/updateconfig

Add comparison of updateconfig to config.ini. Should be same except
for timestamp line.

Replace hardcoded _test_admin with self.dirname.
files
Setup basic genconfig and updateconfig tests. http://hg.code.sf.net:8000/p/roundup/code/#changeset-32ebffbae49aeb6425f6ca04375c59bed21c29df John Rouillard rouilj@ieee.org 2020-06-07T17:13:28-04:00 2020-06-07T17:13:28-04:00
changeset 32ebffbae49a
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description Setup basic genconfig and updateconfig tests.
files
Test for cli. Command partial match, Bad command, bad args. http://hg.code.sf.net:8000/p/roundup/code/#changeset-81babf5a4494caea25fbf6cbf8a856a695ff1968 John Rouillard rouilj@ieee.org 2020-06-04T12:06:34-04:00 2020-06-04T12:06:34-04:00
changeset 81babf5a4494
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description Test for cli. Command partial match, Bad command, bad args.
files
Add tests for get and set, clean up Specification test. http://hg.code.sf.net:8000/p/roundup/code/#changeset-49f599f187e1ac29ff246ababfa6cd34d16b882c John Rouillard rouilj@ieee.org 2020-05-19T17:49:46-04:00 2020-05-19T17:49:46-04:00
changeset 49f599f187e1
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description Add tests for get and set, clean up Specification test.
files
Nuke database on install and fix specification test http://hg.code.sf.net:8000/p/roundup/code/#changeset-227c05ce2d8523def841d54abdfb55d2ab4dae95 John Rouillard rouilj@ieee.org 2020-05-19T01:14:48-04:00 2020-05-19T01:14:48-04:00
changeset 227c05ce2d85
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description Nuke database on install and fix specification test

Need to empty database as part of install_init(). Wasn't a problem for
sqlite/anydbm as those got nuked by killing the test directory on each
new test. For postgres/mysql in CI it needs to be nuked.

Using admin.force=True to get the admin.py module to do it. If that
doesn't work can open the instance and nuke it manually.

Fields listed when getting specification for class are in different
orders for different databases backends and versions. Use sorted
lines for comparison.
files
Fix postgres/mysql testing; test filter. http://hg.code.sf.net:8000/p/roundup/code/#changeset-41907e1f9c3fa22f3607912230e92019eb18ca30 John Rouillard rouilj@ieee.org 2020-05-19T00:16:21-04:00 2020-05-19T00:16:21-04:00
changeset 41907e1f9c3f
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description Fix postgres/mysql testing; test filter.

Apparently I killed the testFilter test by using it for the testFind
check.

Also testing showed that filter issue assignedto=admin,anonymous
wasn't properly mapped to be the same as assignedto=1,2.

Also set all rdbms properties to allow roundup-admin to create the
databses for postgres and mysql. Pulled props from
test/db_test_base.py.
files
Add roundup-admin filter command; fix bad doc example; add tests http://hg.code.sf.net:8000/p/roundup/code/#changeset-d25638d1826c499315e8fb8e9d7016f08f5b7970 John Rouillard rouilj@ieee.org 2020-05-18T23:28:03-04:00 2020-05-18T23:28:03-04:00
changeset d25638d1826c
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description Add roundup-admin filter command; fix bad doc example; add tests

admin_guide.txt had an example using find with username prop. This is
wrong. Find only works with links not string. Fix it to use filter.

Add filter command to roundup-admin.

Add tests for filter, specification and find.
files
[maint-1.6] issue2551029: Jinja2 template install error. http://hg.code.sf.net:8000/p/roundup/code/#changeset-bed579f654ee7b6ecad09d8b7f171a6da0bec471 John Rouillard rouilj@ieee.org 2019-06-04T18:42:05-04:00 2019-06-04T18:42:05-04:00
changeset bed579f654ee
branch maint-1.6
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description issue2551029: Jinja2 template install error.

Issue where template's config.ini not getting updated.

Change do_install in admin.py to load config_ini.ini from template
before writing tracker's config.ini. This generates an updated
config file for the user on install preserving values required tomake
tracker work.

Added config_ini.ini files to jinja2 and responsive templates to set
required values (template_engine and static_files; static_files
resp.).

Documented new file in doc/tracker_templates.txt and added tests for
new admin.py code.
files
issue2551029: Jinja2 template install error. http://hg.code.sf.net:8000/p/roundup/code/#changeset-b76be13e027edbc8275cf1a90fb996d4add13320 John Rouillard rouilj@ieee.org 2019-06-04T18:42:05-04:00 2019-06-04T18:42:05-04:00
changeset b76be13e027e
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description issue2551029: Jinja2 template install error.

Issue where template's config.ini not getting updated.

Change do_install in admin.py to load config_ini.ini from template
before writing tracker's config.ini. This generates an updated
config file for the user on install preserving values required tomake
tracker work.

Added config_ini.ini files to jinja2 and responsive templates to set
required values (template_engine and static_files; static_files
resp.).

Documented new file in doc/tracker_templates.txt and added tests for
new admin.py code.
files
A basic set of tests for admin.py. Triggered by http://hg.code.sf.net:8000/p/roundup/code/#changeset-95dfdbaf5aa6e646fcccacf1c4f58018147ef761 John Rouillard rouilj@ieee.org 2019-04-21T21:00:06-04:00 2019-04-21T21:00:06-04:00
changeset 95dfdbaf5aa6
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description A basic set of tests for admin.py. Triggered by
https://issues.roundup-tracker.org/issue2551042
files