jenkins-bot has submitted this change and it was merged.
Change subject: [test only] Stricter avro schema tests
......................................................................
[test only] Stricter avro schema tests
Adjusts to ensure the schema is configured with all required properties.
This is related to Id27ed7b52 which remove the BC support from the
avro formatter.
Change-Id: I6ca59071ee45bd975aaefa2e5fe7be39cef28de7
---
M tests/loggingTest.php
1 file changed, 6 insertions(+), 4 deletions(-)
Approvals:
DCausse: Looks good to me, but someone else must approve
EBernhardson: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/loggingTest.php b/tests/loggingTest.php
index 81efb09..6129b99 100644
--- a/tests/loggingTest.php
+++ b/tests/loggingTest.php
@@ -115,8 +115,8 @@
require "{$wmfConfigDir}/InitialiseSettings.php";
$tests = array();
- foreach ( $wgConf->settings['wmgMonologAvroSchemas']['default']
as $name => $schema ) {
- $tests[$name] = array( $schema );
+ foreach ( $wgConf->settings['wmgMonologAvroSchemas']['default']
as $name => $schemaConfig ) {
+ $tests[$name] = array( $schemaConfig );
}
return $tests;
}
@@ -124,8 +124,10 @@
/**
* @dataProvider provideAvroSchemas
*/
- public function testAvroSchemasIsValidJson( $schema ) {
- json_decode( $schema['schema'] );
+ public function testAvroSchemasIsValidJson( $schemaConfig ) {
+ $this->assertArrayHasKey( 'schema', $schemaConfig );
+ $this->assertArrayHasKey( 'revision', $schemaConfig );
+ json_decode( $schemaConfig['schema'] );
$this->assertEquals( JSON_ERROR_NONE, json_last_error() );
}
--
To view, visit https://gerrit.wikimedia.org/r/261296
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6ca59071ee45bd975aaefa2e5fe7be39cef28de7
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>
Gerrit-Reviewer: BryanDavis <[email protected]>
Gerrit-Reviewer: DCausse <[email protected]>
Gerrit-Reviewer: EBernhardson <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits