Shubham, Ankit | Add. All the properties of labels are mandatory
This commit is contained in:
@@ -7,5 +7,6 @@
|
||||
"micrometer-prometheus": {
|
||||
"enum": ["enabled","disabled"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["micrometer-prometheus"]
|
||||
}
|
||||
@@ -110,4 +110,13 @@ public class SchemaTest {
|
||||
|
||||
assertTrue(validationUtils.isJsonValid(schemaFile, jsonFile));
|
||||
}
|
||||
|
||||
@Test
|
||||
void expectFalseWhenLabelPropertyIsMissing() throws IOException, ProcessingException {
|
||||
File schemaFile = new File(schemaPath + "labels.json");
|
||||
File jsonFile = new File(testData + "invalidLabel.json");
|
||||
ValidationUtils validationUtils = new ValidationUtils();
|
||||
|
||||
assertFalse(validationUtils.isJsonValid(schemaFile, jsonFile));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{}
|
||||
Reference in New Issue
Block a user