Skip to content

Commit a3367fb

Browse files
committed
Add unit tests for internalOperatorCert/Key parameter validation
1 parent 9484246 commit a3367fb

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

kubernetes/src/test/java/oracle/kubernetes/operator/helm/CreateOperatorInputsValidationIT.java

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,27 @@ private void misconfigureExternalRestCustomCert() {
241241
setProperty("externalOperatorKey", true);
242242
}
243243

244-
// TBD - add similar tests for internalRest
244+
@Test
245+
public void whenInternalRestSelfSignedCert_reportRelatedParameterErrors() throws Exception {
246+
misconfigureInternalRestSelfSignedCert();
247+
248+
assertThat(
249+
getProcessingError(),
250+
allOf(
251+
containsTypeError("internalOperatorCert", "string", "float64"),
252+
containsTypeError("internalOperatorKey", "string", "bool")));
253+
}
254+
255+
@Test
256+
public void whenInternalRestCustomCert_reportRelatedParameterErrors() throws Exception {
257+
misconfigureInternalRestCustomCert();
258+
259+
assertThat(
260+
getProcessingError(),
261+
allOf(
262+
containsTypeError("internalOperatorCert", "string", "float64"),
263+
containsTypeError("internalOperatorKey", "string", "bool")));
264+
}
245265

246266
private void misconfigureInternalRestSelfSignedCert() {
247267
setProperty("internalRestOption", "SELF_SIGNED_CERT");

0 commit comments

Comments
 (0)