package integration import ( "context" "fmt" "gitea.pena/SQuiz/common/dal" "testing" ) func Test_GetQuestionList(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() d, err := dal.New(ctx, "host=localhost port=35432 user=squiz password=Redalert2 dbname=squiz sslmode=disable", nil) if err != nil { t.Fatal(err) } defer d.Close() limit := int32(10) offset := int32(1000) list, count, err := d.QuestionRepo.GetQuestionsAI(ctx, 1308, "", limit, offset) if err != nil { t.Fatal(err) } fmt.Println(list) fmt.Println(count) }