fix: correct perms for forbidden error in TemplateScheduleStore.Load (#11286)

* chore: TemplateScheduleStore.Load() throwing forbidden error
* fix: workspace agent scope to include template
This commit is contained in:
Steven Masley
2023-12-20 11:38:49 -06:00
committed by GitHub
parent 20dff2aa5d
commit fe867d02e0
8 changed files with 49 additions and 16 deletions

View File

@ -394,12 +394,14 @@ func TestAgentStats(t *testing.T) {
require.NoError(t, err, "create stats batcher failed")
t.Cleanup(closeBatcher)
tLogger := slogtest.Make(t, nil)
// Build sample workspaces with test agents and fake agent client
client, _, _ := coderdtest.NewWithAPI(t, &coderdtest.Options{
Database: db,
IncludeProvisionerDaemon: true,
Pubsub: pubsub,
StatsBatcher: batcher,
Logger: &tLogger,
})
user := coderdtest.CreateFirstUser(t, client)