@@ -469,10 +469,16 @@ describe('storage', function () {
469469 await file . acl . delete ( { entity : 'allUsers' } ) ;
470470 } ) ;
471471
472- it ( 'should make a file private' , async ( ) => {
473- const validateMakeFilePrivateRejects = ( err : GaxiosError ) => {
474- assert . strictEqual ( err . status , 404 ) ;
475- assert . strictEqual ( err ! . message , 'notFound' ) ;
472+ /**
473+ * TODO: Re-enable once the test environment allows public IAM roles.
474+ * Currently disabled to avoid 403 errors when adding 'allUsers' or
475+ * 'allAuthenticatedUsers' permissions.
476+ */
477+ it . skip ( 'should make a file private' , async ( ) => {
478+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
479+ const validateMakeFilePrivateRejects = ( err : any ) => {
480+ assert . strictEqual ( err . code , 404 ) ;
481+ assert . strictEqual ( err ! . errors ! [ 0 ] . reason , 'notFound' ) ;
476482 return true ;
477483 } ;
478484 await assert . doesNotReject ( file . makePublic ( ) ) ;
@@ -543,9 +549,10 @@ describe('storage', function () {
543549 } ) ;
544550
545551 it ( 'should make a file private from a resumable upload' , async ( ) => {
546- const validateMakeFilePrivateRejects = ( err : GaxiosError ) => {
547- assert . strictEqual ( ( err as GaxiosError ) ! . status , 404 ) ;
548- assert . strictEqual ( ( err as GaxiosError ) . message , 'notFound' ) ;
552+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
553+ const validateMakeFilePrivateRejects = ( err : any ) => {
554+ assert . strictEqual ( err ! . code , 404 ) ;
555+ assert . strictEqual ( err . errors ! [ 0 ] . reason , 'notFound' ) ;
549556 return true ;
550557 } ;
551558 await assert . doesNotReject (
@@ -596,7 +603,12 @@ describe('storage', function () {
596603 ) ;
597604 } ) ;
598605
599- it ( 'should set a policy' , async ( ) => {
606+ /**
607+ * TODO: Re-enable once the test environment allows public IAM roles.
608+ * Currently disabled to avoid 403 errors when adding 'allUsers' or
609+ * 'allAuthenticatedUsers' permissions.
610+ */
611+ it . skip ( 'should set a policy' , async ( ) => {
600612 const [ serviceAccount ] = await storage . getServiceAccount ( ) ;
601613 const [ policy ] = await bucket . iam . getPolicy ( ) ;
602614 const member = `serviceAccount:${ serviceAccount ! . emailAddress } ` ;
@@ -631,7 +643,12 @@ describe('storage', function () {
631643 } ) ;
632644
633645
634- it ( 'should get-modify-set a conditional policy' , async ( ) => {
646+ /**
647+ * TODO: Re-enable once the test environment allows public IAM roles.
648+ * Currently disabled to avoid 403 errors when adding 'allUsers' or
649+ * 'allAuthenticatedUsers' permissions.
650+ */
651+ it . skip ( 'should get-modify-set a conditional policy' , async ( ) => {
635652 // Uniform-bucket-level-access is required to use IAM Conditions.
636653 await bucket . setMetadata ( {
637654 iamConfiguration : {
@@ -2929,7 +2946,7 @@ describe('storage', function () {
29292946 } ) ;
29302947 } ) ;
29312948
2932- describe ( 'kms keys' , ( ) => {
2949+ describe . skip ( 'kms keys' , ( ) => {
29332950 // Test skipped due to kokoro to GCB migration.
29342951 const FILE_CONTENTS = 'secret data' ;
29352952
0 commit comments