Commit graph

12 commits

Author SHA1 Message Date
Kunal Mehta
b4925e34d0 tests: Enable PHPUnit 4/6 compat layer in some tests that need it
Change-Id: I27a21fa9e97414fae02acbefb28011f0275cba63
2018-04-07 19:31:24 -07:00
Giuseppe Lavagetto
2a77862c52 Expose the latest modified index seen by EtcdConfig
While not immediately useful for fecthing the configuration, this is
basically a version information about the configuration currently loaded
from etcd. A typical use-case for this index is monitoring the freshness
of the configuration across a cluster of servers.

Bug: T182597
Change-Id: I58189d36a5b620fb44323bae87257f085a64386e
2018-03-01 13:44:15 +01:00
Umherirrender
63d96c15fd build: Updating mediawiki/mediawiki-codesniffer to 16.0.0
Change-Id: I59b59f79bbf3ce4feff3b3a20c1c31bc16370531
2018-02-17 13:29:13 +01:00
Timo Tijhof
738299fa3f config: Increase coverage of EtcdConfig::parseDirectory()
One of the error cases wasn't covered yet.

Change-Id: I762b37c7448c0f689248a99bad0b206d7cf63d73
2018-01-12 19:25:58 +00:00
Kunal Mehta
75160bdd3b Use MediaWikiCoversValidator for tests that don't use MediaWikiTestCase
Change-Id: I8c4de7e9c72c9969088666007b54c6fd23f6cc13
2018-01-01 08:28:02 +00:00
Umherirrender
29323f5622 Fix test class names to match convention
The test class should have Test at end
and same name as the testing class

Change-Id: Id0c90994d257fb325834e123b462f7f0849ac556
2017-12-10 11:41:59 +01:00
Tim Starling
95bf0043ef EtcdConfig: allow slashes in config key names
Allowing slashes in config key names allows us to trivially support the
proposed hierarchical structure with a single EtcdConfig object, by
fetching values with the relevant prefixes on startup.

Bug: T156924
Change-Id: Ica0914e61baba9c0462481925be15d79b66dc342
2017-09-01 13:42:28 +10:00
WMDE-Fisch
6df9ed1ad6 update mediawiki-codesniffer to 0.11.0 and fix issues
- mostly auto fixes
- some too long lines fixed
- ignore amp space in one case  passing by reference

Change-Id: I6472f83bc3cbf4bd629d83050cc3319b19ec465c
2017-08-11 22:27:51 +02:00
Timo Tijhof
965d5ff5c6 config: Add more EtcdConfig::fetchAllFromEtcdServer tests
Bug: T156924
Change-Id: I88a1c97b6921b59cce93f22d473dd7cea6f4931c
2017-07-24 13:04:00 -07:00
Timo Tijhof
63a6926dfd config: Fix invalid EtcdConfig return value after JSON parse error
Follows-up 1f2daa9132, 9b459d29e0, 110a21ea18.

Bug: T156924
Change-Id: I79b7e11b32e5be46c8ebdfb5c937e38e46301c0e
2017-07-24 12:50:26 -07:00
Timo Tijhof
1f2daa9132 config: Add tests for EtcdConfig::fetchAllFromEtcdServer
Follows-up 9b459d29e0, 110a21ea18.

Bug: T156924
Change-Id: Ib68c55ea3386a12e707f6d7d732da9fe727ccc2f
2017-07-23 01:42:49 +00:00
Timo Tijhof
110a21ea18 config: Add unit tests for EtcdConfig
Change-Id: I6e647985b98724b5448831a6fae1b2d2521fd363
2017-05-01 21:50:38 +00:00