diff options
Diffstat (limited to 'util/lamport/persisted_clock_test.go')
-rw-r--r-- | util/lamport/persisted_clock_test.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/util/lamport/persisted_clock_test.go b/util/lamport/persisted_clock_test.go new file mode 100644 index 00000000..aacec3bf --- /dev/null +++ b/util/lamport/persisted_clock_test.go @@ -0,0 +1,19 @@ +package lamport + +import ( + "io/ioutil" + "path" + "testing" + + "github.com/stretchr/testify/require" +) + +func TestPersistedClock(t *testing.T) { + dir, err := ioutil.TempDir("", "") + require.NoError(t, err) + + c, err := NewPersistedClock(path.Join(dir, "test-clock")) + require.NoError(t, err) + + testClock(t, c) +} |