mirror of
https://github.com/SecurityBrewery/catalyst.git
synced 2025-12-06 15:22:47 +01:00
27 lines
648 B
Go
27 lines
648 B
Go
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")
|
|
}
|