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 Mar 27, 2024
1 parent 673cfe1 commit a22a425
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions engine_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package veracity

import (
"log/slog"
"testing"

"github.com/dogmatiq/enginekit/enginetest"
"github.com/dogmatiq/persistencekit/driver/memory/memoryjournal"
"github.com/dogmatiq/persistencekit/driver/memory/memorykv"
"github.com/dogmatiq/spruce"
)

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

enginetest.RunTests(
t,
func(p enginetest.SetupParams) enginetest.SetupResult {
e := New(
p.App,
WithJournalStore(&memoryjournal.BinaryStore{}),
WithKeyValueStore(&memorykv.BinaryStore{}),
WithLogger(logger),
)

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

0 comments on commit a22a425

Please sign in to comment.