Skip to content

Commit 96c1740

Browse files
committed
fix(integration): align Zonal and Pirlo bucket handling across test suites
1 parent f7261d4 commit 96c1740

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

tools/integration_tests/list_large_dir/list_dir_with_twelve_thousand_files_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ func (t *listLargeDir) TestListDirectoryWithTwelveThousandFilesAndHundredExplici
275275
}
276276

277277
func (t *listLargeDir) TestListDirectoryWithTwelveThousandFilesAndHundredExplicitDirAndHundredImplicitDir() {
278-
if setup.IsZonalBucketRun() {
278+
if setup.IsZonalBucketRun() || setup.IsPirloBucketRun() {
279279
t.T().Skipf("Redundant test for ZB as implicit-dir is a non-HNS concept, hence not applicable here. ")
280280
}
281281
dirPath := prepareTestDirectory(t.T(), true, true)

tools/integration_tests/requester_pays_bucket/setup_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ var (
7474
func TestMain(m *testing.M) {
7575
setup.ParseSetUpFlags()
7676

77-
if setup.IsZonalBucketRun() {
77+
if setup.IsZonalBucketRun() || setup.IsPirloBucketRun() {
7878
log.Fatal("Test not supported for zonal bucket as they don't support requester-pays feature")
7979
}
8080

tools/integration_tests/unfinalized_object/setup_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func TestMain(m *testing.M) {
6060
testEnv.cfg = &cfg.UnfinalizedObject[0]
6161
testEnv.bucketType = setup.TestEnvironment(testEnv.ctx, testEnv.cfg)
6262

63-
if !setup.IsZonalBucketRun() {
63+
if !setup.IsZonalBucketRun() && !setup.IsPirloBucketRun() {
6464
log.Printf("This test is only for Zonal buckets.")
6565
os.Exit(0)
6666
}

tools/integration_tests/util/client/storage_client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ func WithAppendableAPI(use bool) WriterOption {
237237
func NewWriterWithOptions(ctx context.Context, o *storage.ObjectHandle, opts ...WriterOption) *storage.Writer {
238238
// 1. Set the dynamic defaults first
239239
cfg := writerConfig{
240-
finalizeOnClose: !setup.IsZonalBucketRun(),
240+
finalizeOnClose: !(setup.IsZonalBucketRun() || setup.IsPirloBucketRun()),
241241
}
242242

243243
// 2. Apply any explicit overrides passed by the caller
@@ -248,7 +248,7 @@ func NewWriterWithOptions(ctx context.Context, o *storage.ObjectHandle, opts ...
248248
// 3. Construct the writer using the final resolved config
249249
wc := o.NewWriter(ctx)
250250
wc.FinalizeOnClose = cfg.finalizeOnClose
251-
wc.Append = cfg.useAppendableAPI || setup.IsZonalBucketRun()
251+
wc.Append = cfg.useAppendableAPI || setup.IsZonalBucketRun() || setup.IsPirloBucketRun()
252252

253253
if cfg.storageClass != "" {
254254
wc.StorageClass = cfg.storageClass

tools/integration_tests/write_large_files/concurrent_write_to_same_file_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func writeToFileSequentially(t *testing.T, filePaths []string, startOffset int,
6969

7070
startOffset = startOffset + chunkSize
7171
}
72-
if setup.IsZonalBucketRun() {
72+
if setup.IsZonalBucketRun() || setup.IsPirloBucketRun() {
7373
operations.SyncFiles(filesToWrite, t)
7474
}
7575
}

0 commit comments

Comments
 (0)