summaryrefslogtreecommitdiff
path: root/src/mailman/runners/tests (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* More fixes.Barry Warsaw2013-11-261-0/+1
|
* Checkpointing.Barry Warsaw2013-11-251-0/+14
|
* Migrate bounceevent.list_name -> bounceevent.list_idBarry Warsaw2013-09-012-4/+4
| | | | | | | * Rename StormBaseDatabase._create() -> .initialize() * Refactor database initialization. * make_listid() helper. * Add a pivot() helper for schema migrations.
* * `bin/runner` command has been simplified and its command line optionsBarry Warsaw2013-06-172-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | reduced. Now, only one `-r/--runner` option may be provided and the round-robin feature has been removed. * Fixed REST server crash on `reopen` command. Identification and test provided by Aurélien Bompard. (LP: #1184376) Also: * bin/runner now uses standard argparse instead of ScriptOptions. * The entire bin/runner machinery has bee reorganized and simplified. There * is no more Loop class. Signal setting is moved directly into the base Runner class and overrided in specific subclasses (e.g. RESTRunner which must cleanly shutdown its TCPServer). The runner exit status is now set directly on the Runner instance. * Fixed a few minor style issues. * In order to cleanly shutdown the RESTRunner's WSGI server, we must start a subthread which only watches for an Event and then calls the server's shutdown() method. It has to be this way because the WSGI server itself (due to interactions with SQLite), and the signal handlers (due to Python's signal handling semantics) must both run in the main thread. However, the shutdown() must be invoked from a subthread in order to prevent deadlock. * Refactor the RESTLayer to eliminate duplication of code.
* * Creation of lists with upper case names should be coerced to lower case.Barry Warsaw2013-03-061-0/+27
| | | | (LP: #1117176)
* * Non-queue runners should not create ``var/queue`` subdirectories. Fixed byBarry Warsaw2013-01-201-0/+8
|\ | | | | | | Sandesh Kumar Agrawal. (LP: #1095422)
| * Test added to non_queue_runner bugSandesh Kumar Agrawal2013-01-171-0/+7
| |
* | Whitespace.Barry Warsaw2013-01-201-1/+1
|/
* Bump copyright years.Barry Warsaw2013-01-0111-11/+11
|
* LP: #975692 phase 1Barry Warsaw2012-12-281-5/+1
| | | | | | | | | | | | | | | | | * Rework list style management. No more style priorities or matching.. Now, you name a style explicitly to apply and that's it. * create_list() now takes a `style` argument. * config file now names both a default style to use, and a set of paths to scan for IStyle instances. (This could be a model for other plugins.) * added IMailingList.style_name to record the last style applied, but this is going to be removed in subsequent revisions. Also: * Move find_components() and scan_module() from app/finder.py to utilities/modules.py * Cleaned up lifecycle.rst for better documentation. Some tests moved to test_lifecycle.py. * Remove some unnecessary test tearDown() code.
* ConfigurationBarry Warsaw2012-11-041-3/+0
| | | | | | | | | | | | | | | ------------- * `[passlib]path` configuration variable renamed to `[passlib]configuration`. * Postfix-specific configurations in the `[mta]` section are moved to a separate file, named by the `[mta]configuration` variable. * In the new `postfix.cfg` file, `postfix_map_cmd` is renamed to `postmap_command`. Also: * More Python 2.7-isms, use assertMultiLineEqual() directly. * Added external_configuration() and load_external() to mailman.config.config * ConfigLayer does a blanket set of [postfix]postmap_command so subtests generally won't have to.
* * Python 2.7 is not required. Python 2.6 is no longer officially supported.Barry Warsaw2012-10-313-12/+7
| | | | | The code base is now also `python2.7 -3` clean, although there are still some warnings in 3rd party dependencies. LP: #1073506
* trunk mergeBarry Warsaw2012-07-066-28/+38
|\
| * General code cleanup.Barry Warsaw2012-04-253-9/+17
| | | | | | | | | | | | | | | | - Add explicit dependency on zope.event in setup.py. - Use Python 3 compatible syntax for specifying that a class implements an interface, i.e. the @implementer class decorator. - print_function futures. - Whitespace normalization.
| * Two more module modernizations and transaction context manager uses.Barry Warsaw2012-04-222-8/+9
| |
| * - Module modernization by adding the print_function() import.Barry Warsaw2012-04-221-11/+12
| | | | | | | | - Update many tests to use the transaction() context manager.
* | - Rename the model attributes.Barry Warsaw2012-04-081-9/+9
|/ | | | - news_moderation -> newsgroup_moderation
* The port of NNTPRunner to Mailman 3 is complete.Barry Warsaw2012-04-011-4/+148
| | | | | | * Configuration schema variable changes: [nntp]username -> [nntp]user [nntp]port (added)
* - More tests of mailman.runners.nntp.prepare_message(), this time of theBarry Warsaw2012-04-012-31/+68
| | | | | | | | | header removal and de-duplication algorithms. - Improve the robustness of the de-duplication code. - Add a very nice helper called `configuration` which can be used either as a decorator or context manager to temporarily set values in a configuration section. No more need to manage pushes/pops. More code needs to be converted to use this style.
* More tests, though still not 100% coverage.Barry Warsaw2012-03-311-0/+27
|
* * The `news` runner and queue has been renamed to the more accurate `nntp`.Barry Warsaw2012-03-311-0/+141
| | | | Beta testers can can safely remove `$var_dir/queue/news`.
* ArchitectureBarry Warsaw2012-03-262-6/+156
| | | | | | | | | | | | | | | | | | | ------------ * Internally, all datetimes are kept in the UTC timezone, however because of LP: #280708, they are stored in the database in naive format. * `received_time` is now added to the message metadata by the LMTP runner instead of by `Switchboard.enqueue()`. This latter no longer depends on `received_time` in the metadata. * The `ArchiveRunner` no longer acquires a lock before it calls the individual archiver implementations, since not all of them need a lock. If they do, the implementations must acquire said lock themselves. Configuration ------------- * New configuration variables `clobber_date` and `clobber_skew` supported in every `[archiver.<name>]` section. These are used to determine under what circumstances a message destined for a specific archiver should have its `Date:` header clobbered.
* Last minute emergency bandaid for bug LP: #963612Barry Warsaw2012-03-231-1/+15
|
* Test repair.Barry Warsaw2012-03-231-1/+1
|
* Verp all messages to the -owners. Add a test to prove that email to -ownersBarry Warsaw2012-03-231-0/+142
| | | | now works as expected!
* Extend the pipeline runner to handle messages to the -owner address.Barry Warsaw2012-03-231-0/+115
|
* Add an owner chain and pipeline to the schema, model, and interface. PlumbBarry Warsaw2012-03-221-0/+94
| | | | this through the incoming runner.
* Several fixes and cleanups, ostensibly to fix Python 2.6 support.Barry Warsaw2012-03-222-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | - email.iterators.body_line_iterator() cannot handle unicodes in Python 2.6, because it uses cStringIO.StringIO under the covers, and *that* can't handle unicode. This works fine in Python 2.7, so I override this for the tests only under 2.6 (the code itself isn't affected). - AddressError needs to str() its IAddress attribute explicitly in the __str__() method, otherwise under Python 2.6, you'll get unprintable reprs in the doctests. Again, this works correctly in 2.7, but EIBTI, so it can't hurt either way. - EmailError: a new exception, not related to AddressError. The reason for this it to conform to current nomenclature: "address" means an IAddress while "email" means a text email address. So InvalidEmailAddressError now derives from EmailError instead of AddressError because it gets passed a text email address, and because that is invalid, it never gets turned into an IAddress. The __str__() of this new base exception class does some tricky encoding to keep it compatible between Python 2.6 and 2.7. - UnverifiedAddressError derives from AddressError instead of the more generic MailmanError. - A few random code cleanups are included.
* Eradicate Pipermail. Everything but the scrubber test works. That will takeBarry Warsaw2012-03-151-0/+112
| | | | some new APIs I suspect.
* * The LMTP server now requires that the incoming message have a `Message-ID`,Barry Warsaw2012-03-132-3/+101
| | | | | | | | | | | otherwise it rejects the message with a 550 error. Also, the LMTP server adds the `X-Message-ID-Hash` header automatically. The `inject` cli command will also add the `X-Message-ID-Hash` header, but it will craft a `Message-ID` header first if one is missing from the injected text. Also, `inject` will always set the correct value for the `original_size` attribute on the message object, instead of trusting a possibly incorrect value if it's already set. The individual `IArchiver` implementations no longer set the `X-Message-ID-Hash` header.
* * A welcome message is sent when the user confirms their subscription viaBarry Warsaw2012-03-041-0/+30
| | | | | | | | | | email. Also: - The user's Full Name is included on the To line of a welcome message. - Clean up some tests. - The welcome_message_uri for lists using the default style is set to mailman:///welcome.txt so a welcome message is sent by default.
* Prevent the `confirm` command from running more than once on the same token.Barry Warsaw2012-03-011-2/+47
| | | | | Also add some debugging to the verification message, IOW, which template is it using (this may be more generally useful, but for now, it's an experiment).
* * The `join` email command no longer accepts an `address=` argument. ItsBarry Warsaw2012-02-291-4/+100
| | | | | | | | | `digest=` argument now accepts the following values: `no` (for regular delivery), `mime`, or `plain`. Also: - Fix get_queue_messages() to properly sort on the string representation of a header, since it could be a Header instance.
* Make sure that an email subscription request is ignored for addresses whichBarry Warsaw2012-02-291-0/+40
| | | | are already members of the list.
* Remove test turd.Barry Warsaw2012-02-291-3/+0
|
* Don't try to double join someone via a single email command.Barry Warsaw2012-02-292-0/+96
|
* Greatly improve handling non-ascii in email commands.Barry Warsaw2012-02-281-0/+92
|
* * The `confirm` email command now properly handles `Re:`-like prefixes, evenBarry Warsaw2012-02-261-0/+96
| | | | | | | | | | | | if they contain non-ASCII characters. (LP: #685261) Also: - When the registrar confirms an email address, the verified_on value gets set using the Mailman datetime interface. This simply improves testability for that API. - In Runner._one_iteration(), be sure to commit the database transaction *before* calling _short_circuit().
* copybumpBarry Warsaw2012-01-013-3/+3
|
* Remove extraneous `test_suite()` functions. zope.testrunner willBarry Warsaw2011-10-301-11/+0
| | | | | | | | | automatically do the right thing in most cases. Keep test_suite() in test_documentation.py since these dynamically set up docs tests properly. Refactor test_passwords.py so that base class tests aren't bogusly run. Also, remove test_membership.py which was essentially disabled because it was testing the MM2 membership API.
* * Implement the style manager as a utility instead of an attribute hangingBarry Warsaw2011-10-241-6/+60
| | | | | | off the `mailman.config.config` object. * Fixed bogus use of `bounce_processing` attribute (should have been `process_bounces`, with thanks to Vincent Fretin. (LP: #876774)
* * Fixed KeyError in retry runner, contributed by Stephen A. Goss.Barry Warsaw2011-10-241-0/+61
|\ | | | | | | (LP: #872391)
| * LP: #872391, fix Retry runner bug with unit testStephen A. Goss2011-10-241-0/+65
|/
* Major terminology shift:Barry Warsaw2011-06-012-10/+10
| | | | | | | | | | | | | | | | | * Queue runners are now called just 'Runners' since several of them don't manage queue directories. * Ban the term 'qrunner' too. * The master queue runner watcher should now just be called the 'master' or the 'master runner'. * bin/qrunner -> bin/runner * mailman.qrunner log file -> mailman.runner * master-qrunner.lck -> master.lck * master-qrunner.pid -> master.pid Also: * Remove some obsolete files * Begin the .txt -> .rst renaming
* Rename 'queue' directory to 'runners' since not all subprocesses run a queue.Barry Warsaw2011-05-293-0/+785