chore: organize http handlers (#1486)

They're currently randomly in a bunch of different files. This cleans up
the handler functions to be in the file of the type they return.
This commit is contained in:
Colin Adler
2022-05-16 14:36:27 -05:00
committed by GitHub
parent 9d4182b189
commit 680de709a5
14 changed files with 1452 additions and 1450 deletions
+16
View File
@@ -27,6 +27,22 @@ func TestWorkspaceBuild(t *testing.T) {
require.NoError(t, err)
}
func TestWorkspaceBuilds(t *testing.T) {
t.Parallel()
t.Run("Single", func(t *testing.T) {
t.Parallel()
client := coderdtest.New(t, nil)
user := coderdtest.CreateFirstUser(t, client)
coderdtest.NewProvisionerDaemon(t, client)
version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, nil)
template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID)
coderdtest.AwaitTemplateVersionJob(t, client, version.ID)
workspace := coderdtest.CreateWorkspace(t, client, user.OrganizationID, template.ID)
_, err := client.WorkspaceBuilds(context.Background(), workspace.ID)
require.NoError(t, err)
})
}
func TestPatchCancelWorkspaceBuild(t *testing.T) {
t.Parallel()
client := coderdtest.New(t, nil)