File tree Expand file tree Collapse file tree
google-cloud-storage/src/test/java/com/google/cloud/storage/it/runner/registry Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323import com .google .cloud .storage .StorageException ;
2424import com .google .cloud .storage .it .BucketCleaner ;
2525import com .google .storage .control .v2 .StorageControlClient ;
26+ import java .util .Locale ;
2627
2728/** Shim to lift a BucketInfo to be a managed bucket instance */
2829final class BucketInfoShim implements ManagedLifecycle {
@@ -53,9 +54,10 @@ public void start() {
5354 try {
5455 createdBucket = s .create (bucketInfo ).asBucketInfo ();
5556 } catch (StorageException se ) {
56- String msg = se .getMessage ();
57+ String msg = se .getMessage (). toLowerCase ( Locale . US ) ;
5758 if (se .getCode () == 400 && (msg .contains ("not a valid zone in location" ))
58- || msg .contains ("custom placement config" )) {
59+ || msg .contains ("custom placement config" )
60+ || msg .contains ("zonal" )) {
5961 assumeTrue (
6062 "Skipping test due to bucket setup unavailable in current zone. (" + msg + ")" , false );
6163 }
You can’t perform that action at this time.
0 commit comments