LegacyVersion class is removed from newer setuptools package. But
support for legacy versions is added in python-jenkins 1.8.2.
Switch to that implementation.
Fix broken plugin version comparison for legacy versions.
Assume latest plugin version if no plugin version is found.
Story: 2010990
Story: 2009943
Story: 2009819
Story: 2010842
Task: 49236
Task: 44852
Task: 44396
Task: 48448
Change-Id: Id7f0be1c42357454bd9bedcdee3fefb174943d81
Pytest makes each scenario into individual selectable test.
To be able to run each scenario separately is very useful for development.
Change-Id: I4b1c990a1fd839ce327cd7faa27159a9b9632fed
Please review the following patch containing the code changes in
the repo. This patch is a transition patch and is the auto-generated
output of the python-black tool.
Change-Id: I2d2de71da8a105fb62b561899ae78441ddab4032
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
The hipchat001 and hipchat_rooms-list001 test/example were swapped (with
hipchat001 being renamed to hipchat_room001).
Change-Id: Ia00964726814d9b1c3a7cb6af20996da087c4ba1
Story: 2000315
Task: 2510
Remove the old default hipchat configuration style in favour of
using the new plugin style and provide a mechanism to copy the url
value from the jenkins section automatically as part of a simple
migration.
This will allow removal of querying the jenkins section from existing
module code and allow for better isolation.
Change-Id: I6889777904ebabc01c044abcd31c9d8a20c255c4
Plugins can use get_plugin_config() which will search in a plugin
namespace. For example:
[plugin "hipchat"]
authtoken = 123token
- Updated hipchat plugin to use get_plugin_config()
- Updated stash plugin to use get_plugin_config()
- Backwards compatibility is kept by falling back to the old
configuration setting if the new one is not found.
- Warning is displayed if the old configuration method is used.
Change-Id: I7cff063e2d179a5d9a3f221c85de6864382bc477
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Refactor base test class inheritance to allow for BaseTest class to be
reused without needing to also import the TestCase class everywhere in
order to avoid having the common test function executed on base classes.
This makes it easier to build base testing classes and then simplifies
the subclassing of these for actual tests.
Change-Id: I89809e8082469f814f245db4a9ab7658aac8a405
The HipChat plugin has changed a good bit in version 0.1.9 such that it
is now purely using the publisher hook and it's acquired a few new
configuration items.
This patch ensures used of the existing format will be automatically
redirected to the newer publisher module which adds support for 0.1.9.
Change-Id: I39452e877b20bfc5654d46c90e91dd877a8ebeb0
Story: 2000301
Story: 2000324
Capture logs to attach them on exceptions to simplify the debugging of
errors in tests when they occur.
Change-Id: I5c1b5c306aba37789a8d41eabf65e0ac628af838
Should always use a ConfigParser object when testing to allow unit tests
to check that calls behave as expected.
Read in the default configuration to align with expected usage, and fix
some issues caused by usage of dicts resulting in the option name
requested being taken as the default value.
Since '.get()' is a valid method for a dictionary object, take care to
ensure that we do not use a dummy dict object as this will not throw the
expected errors if a config file is not provided and will also treat the
option name as a default value resulting in the wrong data appearing in
the outputted XML.
Change-Id: I6abb85f0363a48f220914c52b74e5a5fb65b0faa
the current implementation of the hipchat notification types
is buggy on updates because it never sets previously enabled
types back to false if they are not specified in the yaml anymore
but were once true. also room can be blank so it will use the default
room as configured in the master jenkins configuration
also standardize the notify-* arguments even if jenkins plugin
is bad about it
Change-Id: I02547fb6474b66a4f3d21ec3bf766334c66cf14c
Signed-off-by: Kyle Rockman <kyle.rockman@mac.com>
In newer versions, Jenkins HipChat plugin supports notifications for the
following events:
notify-success
notify-aborted
notify-not-built
notify-unstable
notify-failure
notify-back-to-normal
This commit adds support for these events in JJB. Also, introduces a
unit test for hipchat module and converts doc example generation to
literalinclude.
Change-Id: I3e09b4f2b41db58eb22ada89a633516e319a95bc