@@ -1084,13 +1084,25 @@ public function testMetadata40xs(string $devBranchType, string $userRole, $apiEn
10841084 $ object = ($ apiEndpoint === 'bucket ' ) ? $ bucketId : $ bucketId . $ object ;
10851085
10861086 // test invalid number
1087- try {
1088- $ this ->deleteMetadata ($ apiEndpoint , $ object , 9999999 );
1089- $ this ->fail ('Invalid metadataId ' );
1090- } catch (ClientException $ e ) {
1091- $ this ->assertEquals (404 , $ e ->getCode ());
1092- $ this ->assertEquals ('storage.metadata.notFound ' , $ e ->getStringCode ());
1093- $ this ->assertEquals (sprintf ('Metadata "9999999" not found for bucket "%s". ' , $ this ->getTestBucketId ()), $ e ->getMessage ());
1087+ if ($ apiEndpoint === 'buckets ' ) {
1088+ // test this on migrated endpoint
1089+ try {
1090+ $ this ->deleteMetadata ($ apiEndpoint , $ object , 9999999 );
1091+ $ this ->fail ('Invalid metadataId ' );
1092+ } catch (ClientException $ e ) {
1093+ $ this ->assertEquals (404 , $ e ->getCode ());
1094+ $ this ->assertEquals ('storage.metadata.notFound ' , $ e ->getStringCode ());
1095+ $ this ->assertEquals (sprintf ('Metadata "9999999" not found for bucket "%s". ' , $ this ->getTestBucketId ()), $ e ->getMessage ());
1096+ }
1097+ } else {
1098+ try {
1099+ $ this ->deleteMetadata ($ apiEndpoint , $ object , 9999999 );
1100+ $ this ->fail ('Invalid metadataId ' );
1101+ } catch (ClientException $ e ) {
1102+ $ this ->assertEquals (404 , $ e ->getCode ());
1103+ $ this ->assertEquals ('storage.metadata.notFound ' , $ e ->getStringCode ());
1104+ $ this ->assertEquals ('The supplied metadata ID was not found ' , $ e ->getMessage ());
1105+ }
10941106 }
10951107
10961108 // test null
0 commit comments