From aca7d0fd220860735944a9e19d0f134537c68be5 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Fri, 28 Apr 2023 12:04:56 +0100 Subject: [PATCH] s3: fix potential crash in integration tests --- backend/s3/s3_internal_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/s3/s3_internal_test.go b/backend/s3/s3_internal_test.go index ac67ccc81..e23c68bc3 100644 --- a/backend/s3/s3_internal_test.go +++ b/backend/s3/s3_internal_test.go @@ -322,7 +322,8 @@ func (f *Fs) InternalTestVersions(t *testing.T) { confPath := strings.Replace(newPath, ":", ",versions:", 1) fNew, err := cache.Get(ctx, confPath) // This should return pointing to a file - assert.Equal(t, fs.ErrorIsFile, err) + require.Equal(t, fs.ErrorIsFile, err) + require.NotNil(t, fNew) // With the directory the directory above assert.Equal(t, dirName, path.Base(fs.ConfigString(fNew))) })