File tree Expand file tree Collapse file tree
operator/src/test/java/it/aboutbits/postgresql/_support/testdata/persisted/creator Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -234,11 +234,23 @@ private String getSchema() {
234234 return withSchema ;
235235 }
236236
237+ var databaseName = getDatabase ();
238+ if (databaseName .isBlank ()) {
239+ databaseName = given .one ()
240+ .database ()
241+ .withClusterConnectionName (getClusterConnectionName ())
242+ .withClusterConnectionNamespace (withClusterConnectionNamespace )
243+ .withReclaimPolicy (DELETE )
244+ .returnFirst ()
245+ .getSpec ()
246+ .getName ();
247+ }
248+
237249 var clusterConnectionDb = given .one ()
238250 .clusterConnection ()
239251 .withName (getClusterConnectionName () + "-db" )
240252 .withNamespace (withClusterConnectionNamespace )
241- .withDatabase (getDatabase () )
253+ .withDatabase (databaseName )
242254 .returnFirst ();
243255
244256 var item = given .one ()
Original file line number Diff line number Diff line change @@ -236,11 +236,23 @@ private String getSchema() {
236236 return withSchema ;
237237 }
238238
239+ var databaseName = getDatabase ();
240+ if (databaseName .isBlank ()) {
241+ databaseName = given .one ()
242+ .database ()
243+ .withClusterConnectionName (getClusterConnectionName ())
244+ .withClusterConnectionNamespace (withClusterConnectionNamespace )
245+ .withReclaimPolicy (DELETE )
246+ .returnFirst ()
247+ .getSpec ()
248+ .getName ();
249+ }
250+
239251 var clusterConnectionDb = given .one ()
240252 .clusterConnection ()
241253 .withName (getClusterConnectionName () + "-db" )
242254 .withNamespace (withClusterConnectionNamespace )
243- .withDatabase (getDatabase () )
255+ .withDatabase (databaseName )
244256 .returnFirst ();
245257
246258 var item = given .one ()
You can’t perform that action at this time.
0 commit comments