diff options
| author | Stefan Majewsky <majewsky@gmx.net> | 2026-07-21 14:24:35 +0200 |
|---|---|---|
| committer | Stefan Majewsky <majewsky@gmx.net> | 2026-07-21 14:42:45 +0200 |
| commit | 9bcfd4733a7ae7d12129b024e93536f7136e4a8e (patch) | |
| tree | faac942c4d7780fd5f41e2871ea030ff37328cae /tests/bulk_upload_test.go | |
| parent | 044e297413066262c54beb33e98d0e498178897b (diff) | |
| download | go-schwift-9bcfd4733a7ae7d12129b024e93536f7136e4a8e.tar.gz | |
use t.Context() instead of context.TODO() in tests
Diffstat (limited to 'tests/bulk_upload_test.go')
| -rw-r--r-- | tests/bulk_upload_test.go | 7 |
1 files changed, 3 insertions, 4 deletions
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), |
