diff options
Diffstat (limited to 'internal/state/single_test.go')
-rw-r--r-- | internal/state/single_test.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/internal/state/single_test.go b/internal/state/single_test.go index 9442fdc..a60795c 100644 --- a/internal/state/single_test.go +++ b/internal/state/single_test.go @@ -8,6 +8,7 @@ import ( "crypto/rand" "fmt" "io" + "os" "reflect" "testing" "time" @@ -65,7 +66,12 @@ func TestNewStateManagerSingle(t *testing.T) { secondary.EXPECT().Initiated().Return(false) } - sm, err := NewStateManagerSingle(trillianClient, table.signer, time.Duration(0), time.Duration(0), secondary) + tmpFile, err := os.CreateTemp("", "sigsum-log-test-sth") + if err != nil { + t.Fatal(err) + } + defer os.Remove(tmpFile.Name()) + sm, err := NewStateManagerSingle(trillianClient, table.signer, time.Duration(0), time.Duration(0), secondary, tmpFile) if got, want := err != nil, table.description != "valid"; got != want { t.Errorf("got error %v but wanted %v in test %q: %v", got, want, table.description, err) } |