Skip to content

Commit

Permalink
Add enginekit acceptance tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmalloc authored and danilvpetrov committed Mar 8, 2024
1 parent d0c6c15 commit a789ed1
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"

Check failure on line 8 in engine_test.go

View workflow job for this annotation

GitHub Actions / Shared / Go + Veracity

no required module provides package github.com/dogmatiq/veracity/persistence/driver/memory; to add it:
"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 a789ed1

Please sign in to comment.