Shubham, Ankit | Add. All type of health checks are mandatory
This commit is contained in:
@@ -44,5 +44,6 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["livenessCheck","readinessCheck"]
|
||||
}
|
||||
@@ -92,4 +92,13 @@ public class SchemaTest {
|
||||
|
||||
assertTrue(validationUtils.isJsonValid(schemaFile, jsonFile));
|
||||
}
|
||||
|
||||
@Test
|
||||
void expectFalseWhenFewPropertiesOfHealthChecksAreMissing() throws IOException, ProcessingException {
|
||||
File schemaFile = new File(schemaPath + "healthChecks.json");
|
||||
File jsonFile = new File(testData + "invalidHealthChecks.json");
|
||||
ValidationUtils validationUtils = new ValidationUtils();
|
||||
|
||||
assertFalse(validationUtils.isJsonValid(schemaFile, jsonFile));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"readinessCheck": {
|
||||
"type": "http",
|
||||
"port": "metrics",
|
||||
"path": "/actuator/health",
|
||||
"successThreshold": 1,
|
||||
"initialDelaySeconds": 120,
|
||||
"periodSeconds": 15,
|
||||
"failureThreshold": 5
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user