From 77e3512714d2d90ac8f44de6961d67d3bcd40c52 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Tue, 26 Jul 2022 16:50:55 +0100 Subject: [PATCH] fstests: Make InternalTestFiles so the internal tests know the current state --- fstest/fstests/fstests.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/fstest/fstests/fstests.go b/fstest/fstests/fstests.go index 4d3698c75..28e02a44b 100644 --- a/fstest/fstests/fstests.go +++ b/fstest/fstests/fstests.go @@ -362,6 +362,9 @@ func removeConfigID(s string) string { return s } +// InternalTestFiles is the state of the remote at the moment the internal tests are called +var InternalTestFiles []fstest.Item + // Run runs the basic integration tests for a remote using the options passed in. // // They are structured in a hierarchical way so that dependencies for the tests can be created. @@ -1813,6 +1816,9 @@ func Run(t *testing.T, opt *Opt) { } }) + // State of remote at the moment the internal tests are called + InternalTestFiles = []fstest.Item{file1, file2} + // TestObjectRemove tests Remove t.Run("ObjectRemove", func(t *testing.T) { skipIfNotOk(t) @@ -1822,6 +1828,8 @@ func Run(t *testing.T, opt *Opt) { require.NoError(t, err) // check listing without modtime as TestPublicLink may change the modtime fstest.CheckListingWithPrecision(t, f, []fstest.Item{file2}, nil, fs.ModTimeNotSupported) + // Show the internal tests file2 is gone + InternalTestFiles = []fstest.Item{file2} }) // TestAbout tests the About optional interface