Skip to content

Commit 28fa2f7

Browse files
committed
Fixing tests
Signed-off-by: Danny Kopping <danny@coder.com>
1 parent c0ae1ba commit 28fa2f7

File tree

4 files changed

+9
-141
lines changed

4 files changed

+9
-141
lines changed

coderd/database/dbauthz/dbauthz_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2463,6 +2463,13 @@ func (s *MethodTestSuite) TestSystemFunctions() {
24632463
JobID: j.ID,
24642464
}).Asserts( /*rbac.ResourceSystem, policy.ActionCreate*/ )
24652465
}))
2466+
s.Run("InsertProvisionerJobTimings", s.Subtest(func(db database.Store, check *expects) {
2467+
// TODO: we need to create a ProvisionerJob resource
2468+
j := dbgen.ProvisionerJob(s.T(), db, nil, database.ProvisionerJob{})
2469+
check.Args(database.InsertProvisionerJobTimingsParams{
2470+
JobID: j.ID,
2471+
}).Asserts( /*rbac.ResourceSystem, policy.ActionCreate*/ )
2472+
}))
24662473
s.Run("UpsertProvisionerDaemon", s.Subtest(func(db database.Store, check *expects) {
24672474
org := dbgen.Organization(s.T(), db, database.Organization{})
24682475
pd := rbac.ResourceProvisionerDaemon.InOrg(org.ID)

coderd/workspacebuilds.go

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,21 +1011,3 @@ func convertWorkspaceStatus(jobStatus codersdk.ProvisionerJobStatus, transition
10111011
// return error status since we should never get here
10121012
return codersdk.WorkspaceStatusFailed
10131013
}
1014-
1015-
func convertWorkspaceBuildStats(stats database.ProvisionerJobStat) codersdk.WorkspaceBuildStats {
1016-
return codersdk.WorkspaceBuildStats{
1017-
ID: stats.JobID,
1018-
JobStatus: codersdk.ProvisionerJobStatus(stats.JobStatus),
1019-
WorkerID: stats.WorkspaceID,
1020-
WorkspaceID: stats.WorkspaceID,
1021-
Error: stats.Error.String,
1022-
ErrorCode: stats.ErrorCode.String,
1023-
UpdatedAt: stats.UpdatedAt,
1024-
QueuedSecs: stats.QueuedSecs,
1025-
CompletionSecs: stats.CompletionSecs,
1026-
CanceledSecs: stats.CanceledSecs,
1027-
InitSecs: stats.InitSecs,
1028-
PlanSecs: stats.PlanSecs,
1029-
ApplySecs: stats.ApplySecs,
1030-
}
1031-
}

provisioner/terraform/timings_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ import (
1818
// This log content is then used to usher the provisioning process along as if terraform has run, and consequently
1919
// the timing data is extracted from the log content and validated against the expected values.
2020
func TestTimingsFromProvision(t *testing.T) {
21+
t.Parallel()
22+
2123
cwd, err := os.Getwd()
2224
require.NoError(t, err)
2325

site/e2e/google/protobuf/timestampGenerated.ts

Lines changed: 0 additions & 123 deletions
This file was deleted.

0 commit comments

Comments
 (0)