Skip to content

Commit

Permalink
Add enginekit acceptance tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmalloc committed Feb 29, 2024
1 parent 71202f4 commit 74cdf92
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions engine_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package veracity

import (
"testing"

"github.com/dogmatiq/enginekit/enginetest"
"github.com/dogmatiq/veracity/internal/test"
"github.com/dogmatiq/veracity/persistence/driver/memory"
"golang.org/x/exp/slog"
)

func TestEngine(t *testing.T) {
logger := slog.Default()
if testing.Verbose() {
logger = test.NewLogger(t)
}

enginetest.RunTests(
t,
func(p enginetest.SetupParams) enginetest.SetupResult {
e := New(
p.App,
WithJournalStore(&memory.JournalStore{}),
WithKeyValueStore(&memory.KeyValueStore{}),
WithLogger(logger),
)

return enginetest.SetupResult{
RunEngine: e.Run,
Executor: e,
}
},
)
}

0 comments on commit 74cdf92

Please sign in to comment.