@@ -47,23 +47,23 @@ func TestWorkspaceAgentReportStats(t *testing.T) {
47
47
t .Run (tc .name , func (t * testing.T ) {
48
48
t .Parallel ()
49
49
50
- tickCh := make (chan time.Time )
51
- flushCh := make (chan int , 1 )
52
- client , db := coderdtest .NewWithDatabase (t , & coderdtest.Options {
53
- WorkspaceUsageTrackerFlush : flushCh ,
54
- WorkspaceUsageTrackerTick : tickCh ,
55
- })
56
- user := coderdtest .CreateFirstUser (t , client )
57
- r := dbfake .WorkspaceBuild (t , db , database.WorkspaceTable {
58
- OrganizationID : user .OrganizationID ,
59
- OwnerID : user .UserID ,
60
- }).WithAgent (func (agent []* proto.Agent ) []* proto.Agent {
61
- for _ , a := range agent {
62
- a .ApiKeyScope = string (tc .apiKeyScope )
63
- }
50
+ tickCh := make (chan time.Time )
51
+ flushCh := make (chan int , 1 )
52
+ client , db := coderdtest .NewWithDatabase (t , & coderdtest.Options {
53
+ WorkspaceUsageTrackerFlush : flushCh ,
54
+ WorkspaceUsageTrackerTick : tickCh ,
55
+ })
56
+ user := coderdtest .CreateFirstUser (t , client )
57
+ r := dbfake .WorkspaceBuild (t , db , database.WorkspaceTable {
58
+ OrganizationID : user .OrganizationID ,
59
+ OwnerID : user .UserID ,
60
+ }).WithAgent (func (agent []* proto.Agent ) []* proto.Agent {
61
+ for _ , a := range agent {
62
+ a .ApiKeyScope = string (tc .apiKeyScope )
63
+ }
64
64
65
- return agent
66
- },
65
+ return agent
66
+ },
67
67
).Do ()
68
68
69
69
ac := agentsdk .New (client .URL )
0 commit comments