HADOOP-17433. Skipping network I/O in S3A getFileStatus(/) breaks ITestAssumeRole. (#2600)

Contributed by Steve Loughran.

Change-Id: Iece617be78e80fc7e956074eddf171f7763a2e66
This commit is contained in:
Steve Loughran 2021-01-19 17:19:27 +00:00
parent 26cd02fb29
commit b645e58de2
No known key found for this signature in database
GPG Key ID: D22CF846DBB162A0
1 changed files with 3 additions and 1 deletions

View File

@ -394,8 +394,10 @@ public void testAssumeRoleRestrictedPolicyFS() throws Exception {
// when S3Guard is enabled, the restricted policy still
// permits S3Guard record lookup, so getFileStatus calls
// will work iff the record is in the database.
// probe the store using a path other than /, so a HEAD
// request is issued.
forbidden("getFileStatus",
() -> fs.getFileStatus(ROOT));
() -> fs.getFileStatus(methodPath()));
}
forbidden("",
() -> fs.listStatus(ROOT));