Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions tavern/test_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (

"github.com/kcarretto/realm/tavern/internal/ent"
"github.com/kcarretto/realm/tavern/internal/ent/tag"
"github.com/kcarretto/realm/tavern/internal/namegen"
)

// createTestData populates the DB with some test data :)
Expand Down Expand Up @@ -183,7 +184,7 @@ func createTestData(ctx context.Context, client *ent.Client) {
SetQuest(printQuest).
SaveX(ctx)

for i := 0; i < 50; i++ {
for i := 0; i < 5; i++ {
createQuest(ctx, client, testBeacons...)
}
}
Expand Down Expand Up @@ -347,14 +348,14 @@ None
func createQuest(ctx context.Context, client *ent.Client, beacons ...*ent.Beacon) {
// Mid-Execution
testTome := client.Tome.Create().
SetName(newRandomIdentifier()).
SetName(namegen.GetRandomName()).
SetDescription("Print a message for fun!").
SetEldritch(`print(input_params['msg'])`).
SetParamDefs(`[{"name":"msg","label":"Message","type":"string","placeholder":"something to print"}]`).
SaveX(ctx)

q := client.Quest.Create().
SetName(newRandomIdentifier()).
SetName(namegen.GetRandomName()).
SetParameters(`{"msg":"Hello World!"}`).
SetTome(testTome).
SaveX(ctx)
Expand Down