mirror of
https://github.com/SecurityBrewery/catalyst.git
synced 2025-12-06 15:22:47 +01:00
refactor: remove pocketbase (#1138)
This commit is contained in:
26
app/data/demo_test.go
Normal file
26
app/data/demo_test.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package data_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/SecurityBrewery/catalyst/app/data"
|
||||
catalystTesting "github.com/SecurityBrewery/catalyst/testing"
|
||||
)
|
||||
|
||||
func TestGenerate(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
app, cleanup, _ := catalystTesting.App(t)
|
||||
|
||||
t.Cleanup(cleanup)
|
||||
|
||||
_ = app.Queries.DeleteUser(t.Context(), "u_admin")
|
||||
_ = app.Queries.DeleteUser(t.Context(), "u_bob_analyst")
|
||||
_ = app.Queries.DeleteGroup(t.Context(), "g_admin")
|
||||
_ = app.Queries.DeleteGroup(t.Context(), "g_analyst")
|
||||
|
||||
err := data.GenerateDemoData(t.Context(), app.Queries, 4, 4)
|
||||
require.NoError(t, err, "failed to generate fake data")
|
||||
}
|
||||
Reference in New Issue
Block a user