55import io .quarkus .test .junit .QuarkusTest ;
66import it .aboutbits .postgresql ._support .testdata .base .TestUtil ;
77import it .aboutbits .postgresql ._support .testdata .persisted .Given ;
8+ import it .aboutbits .postgresql ._support .valuesource .BlankSource ;
89import it .aboutbits .postgresql .core .CRPhase ;
910import it .aboutbits .postgresql .core .CRStatus ;
1011import it .aboutbits .postgresql .core .FileRef ;
1819import org .junit .jupiter .api .DisplayName ;
1920import org .junit .jupiter .api .Nested ;
2021import org .junit .jupiter .api .Test ;
22+ import org .junit .jupiter .params .ParameterizedTest ;
2123
2224import java .io .IOException ;
2325import java .nio .file .Files ;
@@ -129,8 +131,7 @@ void createsCustomResourceWithFileRef_andReconcilerStatusIsReady() throws IOExce
129131 }
130132
131133 @ Nested
132- @ DisplayName ("CRD Validation: AdminSecret Exclusivity" )
133- class AdminSecretExclusivity {
134+ class CRDValidation {
134135 @ Test
135136 @ DisplayName ("when both adminSecretRef and adminSecretFileRef set, should reject" )
136137 void whenBothSet_shouldReject () {
@@ -156,11 +157,12 @@ void whenNeitherSet_shouldReject() {
156157 .hasMessageContaining ("Exactly one of" );
157158 }
158159
159- @ Test
160+ @ ParameterizedTest
161+ @ BlankSource
160162 @ DisplayName ("when adminSecretFileRef has blank path, should reject" )
161- void whenFileRefBlankPath_shouldReject () {
163+ void whenFileRefBlankPath_shouldReject (String blankOrEmptyString ) {
162164 var fileRef = new FileRef ();
163- fileRef .setPath (" " );
165+ fileRef .setPath (blankOrEmptyString );
164166
165167 assertThatThrownBy (() -> given .one ()
166168 .clusterConnection ()
0 commit comments