@@ -71,8 +71,8 @@ TEST_F(RestArrowFileIOTest, ReadsBackWhatItWroteThroughRealLocalFileIO) {
7171 EXPECT_THAT (io.value ()->DeleteFile (path), IsOk ());
7272}
7373
74- // A break anywhere in the chain (scheme routing, credential forwarding, or the
75- // S3 delegate dropping the `oss://` prefix) shows up as the warning.
74+ # if ICEBERG_S3_ENABLED
75+
7676TEST_F (RestArrowFileIOTest, AppliesOssCredentialThroughRealArrowS3FileIO) {
7777 auto logger = std::make_shared<CapturingLogger>();
7878 ScopedDefaultLogger scoped (logger);
@@ -82,12 +82,16 @@ TEST_F(RestArrowFileIOTest, AppliesOssCredentialThroughRealArrowS3FileIO) {
8282 {{.prefix = " oss://bucket/table" , .config = {{" k" , " v" }}}});
8383 ASSERT_THAT (io, IsOk ());
8484
85- // Opening builds the delegate and applies the credential; the open itself
86- // hits the network, so its result is irrelevant here.
87- std::ignore = io.value ()->NewInputFile (" oss://bucket/table/data/file.parquet" );
85+ // Opening builds the delegate and applies the credential. The open itself hits
86+ // the network, so only the failure modes before that are asserted: a routing
87+ // break surfaces as kNotSupported, and a dropped credential as the warning.
88+ auto input = io.value ()->NewInputFile (" oss://bucket/table/data/file.parquet" );
89+ EXPECT_THAT (input, ::testing::Not (IsError (ErrorKind::kNotSupported )));
8890 EXPECT_FALSE (HasWarning (*logger));
8991}
9092
93+ #endif // ICEBERG_S3_ENABLED
94+
9195} // namespace
9296
9397} // namespace iceberg::rest
0 commit comments