Shubham, Ankit | Add. Validation for all the properties of labels
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "Labels",
|
||||
"type": "object",
|
||||
"description": "Represents labeling",
|
||||
"properties": {
|
||||
"micrometer-prometheus": {
|
||||
"enum": ["enabled","disabled"]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -101,4 +101,13 @@ public class SchemaTest {
|
||||
|
||||
assertFalse(validationUtils.isJsonValid(schemaFile, jsonFile));
|
||||
}
|
||||
|
||||
@Test
|
||||
void expectTrueWhenLabelIsValid() throws IOException, ProcessingException {
|
||||
File schemaFile = new File(schemaPath + "labels.json");
|
||||
File jsonFile = new File(testData + "validLabel.json");
|
||||
ValidationUtils validationUtils = new ValidationUtils();
|
||||
|
||||
assertTrue(validationUtils.isJsonValid(schemaFile, jsonFile));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"micrometer-prometheus": "enabled"
|
||||
}
|
||||
Reference in New Issue
Block a user