feat: add pagination to getWorkspaces (#4521)

This commit is contained in:
Garrett Delfosse
2022-10-13 12:41:13 -04:00
committed by GitHub
parent 574e5d37c7
commit 459ee4e66a
8 changed files with 114 additions and 13 deletions

View File

@ -6,6 +6,7 @@ import (
"testing"
"github.com/coder/coder/coderd/database"
"github.com/coder/coder/codersdk"
"github.com/stretchr/testify/require"
)
@ -135,7 +136,7 @@ func TestSearchWorkspace(t *testing.T) {
c := c
t.Run(c.Name, func(t *testing.T) {
t.Parallel()
values, errs := workspaceSearchQuery(c.Query)
values, errs := workspaceSearchQuery(c.Query, codersdk.Pagination{})
if c.ExpectedErrorContains != "" {
require.True(t, len(errs) > 0, "expect some errors")
var s strings.Builder