aboutsummaryrefslogtreecommitdiffstats
path: root/util/lamport/persisted_clock_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'util/lamport/persisted_clock_test.go')
-rw-r--r--util/lamport/persisted_clock_test.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/util/lamport/persisted_clock_test.go b/util/lamport/persisted_clock_test.go
index aacec3bf..9ef690da 100644
--- a/util/lamport/persisted_clock_test.go
+++ b/util/lamport/persisted_clock_test.go
@@ -1,18 +1,16 @@
package lamport
import (
- "io/ioutil"
- "path"
"testing"
+ "github.com/go-git/go-billy/v5/memfs"
"github.com/stretchr/testify/require"
)
func TestPersistedClock(t *testing.T) {
- dir, err := ioutil.TempDir("", "")
- require.NoError(t, err)
+ root := memfs.New()
- c, err := NewPersistedClock(path.Join(dir, "test-clock"))
+ c, err := NewPersistedClock(root, "test-clock")
require.NoError(t, err)
testClock(t, c)