storage/filestore: test interaction between VerifyDirReadable and VerifyDirWriteable

This commit is contained in:
littleskunk 2021-09-15 17:57:56 +02:00 committed by GitHub
parent 9dab10e1d9
commit 3c3df0f362
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -894,6 +894,10 @@ func TestStorageDirVerification(t *testing.T) {
// test nonexistent file returns error
require.Error(t, store.VerifyStorageDir(ctx, ident0.ID))
// test VerifyWrite doesn't interfere
require.NoError(t, store.CheckWritability(ctx))
require.Error(t, store.VerifyStorageDir(ctx, ident0.ID))
require.NoError(t, dir.CreateVerificationFile(ctx, ident0.ID))
// test correct ID returns no error