chore: Implement joins with golang templates (#6429)

* feat: Implement view for workspace builds to include rbac info

* Removes the need to fetch the workspace to run an rbac check.
* chore: Use workspace build as RBAC object
* chore: Use golang templates instead of sqlc files
This commit is contained in:
Steven Masley
2023-03-10 09:44:38 -06:00
committed by GitHub
parent a666539bfa
commit 8b125d6c5d
36 changed files with 894 additions and 660 deletions

View File

@ -2,17 +2,16 @@ package executor_test
import (
"context"
"os"
"testing"
"time"
"go.uber.org/goleak"
"github.com/google/uuid"
"go.uber.org/goleak"
"github.com/coder/coder/coderd/autobuild/executor"
"github.com/coder/coder/coderd/coderdtest"
"github.com/coder/coder/coderd/database"
"github.com/coder/coder/coderd/database/dbtestutil"
"github.com/coder/coder/coderd/schedule"
"github.com/coder/coder/coderd/util/ptr"
"github.com/coder/coder/codersdk"
@ -493,7 +492,7 @@ func TestExecutorWorkspaceAutostopNoWaitChangedMyMind(t *testing.T) {
}
func TestExecutorAutostartMultipleOK(t *testing.T) {
if os.Getenv("DB") == "" {
if !dbtestutil.UsingRealDatabase() {
t.Skip(`This test only really works when using a "real" database, similar to a HA setup`)
}