8000 Add `reason` field for workspace builds by AbhineetJain · Pull Request #2438 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

Add reason field for workspace builds #2438

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jun 17, 2022
Prev Previous commit
Next Next commit
add more unit tests
  • Loading branch information
AbhineetJain committed Jun 17, 2022
commit d103f69ba7d6a29612e69789b7f2c5bd06deee14
4 changes: 3 additions & 1 deletion coderd/workspaces_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ func TestWorkspace(t *testing.T) {
template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID)
workspace := coderdtest.CreateWorkspace(t, client, user.OrganizationID, template.ID)

_, err := client.Workspace(context.Background(), workspace.ID)
ws, err := client.Workspace(context.Background(), workspace.ID)
require.NoError(t, err)
require.Equal(t, user.UserID, ws.LatestBuild.InitiatorID)
require.Equal(t, codersdk.BuildReasonInitiator, ws.LatestBuild.Reason)
})

t.Run("Deleted", func(t *testing.T) {
Expand Down
0