From 9bcfd4733a7ae7d12129b024e93536f7136e4a8e Mon Sep 17 00:00:00 2001 From: Stefan Majewsky Date: Tue, 21 Jul 2026 14:24:35 +0200 Subject: use t.Context() instead of context.TODO() in tests --- tests/bulk_upload_test.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tests/bulk_upload_test.go') diff --git a/tests/bulk_upload_test.go b/tests/bulk_upload_test.go index 75420a5..ede3a65 100644 --- a/tests/bulk_upload_test.go +++ b/tests/bulk_upload_test.go @@ -21,7 +21,6 @@ package tests import ( "archive/tar" "bytes" - "context" "strings" "testing" @@ -39,7 +38,7 @@ func TestBulkUploadSuccess(t *testing.T) { obj2.FullName(): []byte("world"), }) n, err := c.Account().BulkUpload( - context.TODO(), + t.Context(), "", // upload path schwift.BulkUploadTar, bytes.NewReader(archive), @@ -58,7 +57,7 @@ func TestBulkUploadSuccess(t *testing.T) { func TestBulkUploadArchiveError(t *testing.T) { testWithContainer(t, func(c *schwift.Container) { n, err := c.Account().BulkUpload( - context.TODO(), + t.Context(), c.Name(), // upload path schwift.BulkUploadTar, strings.NewReader("This is not the TAR archive you're looking for."), @@ -84,7 +83,7 @@ func TestBulkUploadObjectError(t *testing.T) { obj2.Name(): []byte("world"), }) n, err := c.Account().BulkUpload( - context.TODO(), + t.Context(), c.Name(), // upload path schwift.BulkUploadTar, bytes.NewReader(archive), -- cgit v1.3.1