Shubham, Ankit | Add. Properties of deployment info to be mandatory
This commit is contained in:
@@ -54,5 +54,16 @@
|
||||
"healthChecks": {
|
||||
"$ref": "file:/Users/kumarshubham/Downloads/Deployment-Portal/src/main/java/com/DeploymentPortal/api/Manifest/schema/healthChecks.json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"cluster",
|
||||
"name",
|
||||
"timeout",
|
||||
"healthChecks",
|
||||
"namespace",
|
||||
"exposedPorts",
|
||||
"loadBalancer",
|
||||
"environmentVariables",
|
||||
"instance"
|
||||
]
|
||||
}
|
||||
@@ -146,4 +146,13 @@ public class SchemaTest {
|
||||
|
||||
assertTrue(validationUtils.isJsonValid(schemaFile, jsonFile));
|
||||
}
|
||||
|
||||
@Test
|
||||
void expectFalseWhenFewPropertiesOfDeploymentAreMissing() throws IOException, ProcessingException {
|
||||
File schemaFile = new File(schemaPath + "deployment.json");
|
||||
File jsonFile = new File(testData + "invalidDeployment.json");
|
||||
ValidationUtils validationUtils = new ValidationUtils();
|
||||
|
||||
assertFalse(validationUtils.isJsonValid(schemaFile, jsonFile));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user