diff options
| author | Stefan Majewsky <stefan.majewsky@sap.com> | 2024-07-08 15:43:52 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-08 15:43:52 +0200 |
| commit | 4fac97b5e944ce70cdca3679f5c2b1eef9b83952 (patch) | |
| tree | fcf486f49df855f2803981c753ed775b1305f6c8 /tests/shared_test.go | |
| parent | 5a783c56a98c225569abfa6fb12fdf55297fee9e (diff) | |
| parent | b7683ab8dcdeca10ff52d626a285edcf7c1db719 (diff) | |
| download | go-schwift-4fac97b5e944ce70cdca3679f5c2b1eef9b83952.tar.gz | |
Merge pull request #19 from SuperSandro2000/context
Remove context from struct, add ctx as first args to many functions
Diffstat (limited to 'tests/shared_test.go')
| -rw-r--r-- | tests/shared_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/shared_test.go b/tests/shared_test.go index a3ef610..1154b83 100644 --- a/tests/shared_test.go +++ b/tests/shared_test.go @@ -87,19 +87,19 @@ func testWithAccount(t *testing.T, testCode func(a *schwift.Account)) { func testWithContainer(t *testing.T, testCode func(c *schwift.Container)) { testWithAccount(t, func(a *schwift.Account) { containerName := getRandomName() - container, err := a.Container(containerName).EnsureExists() + container, err := a.Container(containerName).EnsureExists(context.TODO()) expectSuccess(t, err) testCode(container) // cleanup - exists, err := container.Exists() + exists, err := container.Exists(context.TODO()) expectSuccess(t, err) if exists { - expectSuccess(t, container.Objects().Foreach(func(o *schwift.Object) error { - return o.Delete(nil, nil) + expectSuccess(t, container.Objects().Foreach(context.TODO(), func(o *schwift.Object) error { + return o.Delete(context.TODO(), nil, nil) })) - err = container.Delete(nil) + err = container.Delete(context.TODO(), nil) expectSuccess(t, err) } }) |
