1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 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) }