Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3828089

Browse files
committed
linting
1 parentdee0ca8 commit3828089

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

‎coderd/database/dbauthz/dbauthz_test.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,14 @@ func (s *MethodTestSuite) TestAuditLogs() {
266266
_=dbgen.AuditLog(s.T(),db, database.AuditLog{})
267267
check.Args(database.GetAuditLogsOffsetParams{
268268
LimitOpt:10,
269-
}).Asserts(rbac.ResourceAuditLog,policy.ActionRead)
269+
}).Asserts()
270+
}))
271+
s.Run("GetAuthorizedAuditLogsOffset",s.Subtest(func(db database.Store,check*expects) {
272+
_=dbgen.AuditLog(s.T(),db, database.AuditLog{})
273+
_=dbgen.AuditLog(s.T(),db, database.AuditLog{})
274+
check.Args(database.GetAuditLogsOffsetParams{
275+
LimitOpt:10,
276+
},emptyPreparedAuthorized{}).Asserts()
270277
}))
271278
}
272279

‎coderd/database/querier_test.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,6 @@ func TestAuthorizedAuditLogs(t *testing.T) {
787787
ID:id,
788788
OrganizationID:uuid.Nil,
789789
}))
790-
791790
}
792791

793792
orgAuditLogs:=map[uuid.UUID][]uuid.UUID{
@@ -827,6 +826,8 @@ func TestAuthorizedAuditLogs(t *testing.T) {
827826
}
828827

829828
t.Run("NoAccess",func(t*testing.T) {
829+
t.Parallel()
830+
830831
siteAuditorCtx:=dbauthz.As(ctx, rbac.Subject{
831832
FriendlyName:"member",
832833
ID:uuid.NewString(),
@@ -840,6 +841,8 @@ func TestAuthorizedAuditLogs(t *testing.T) {
840841
})
841842

842843
t.Run("SiteWideAuditor",func(t*testing.T) {
844+
t.Parallel()
845+
843846
siteAuditorCtx:=dbauthz.As(ctx, rbac.Subject{
844847
FriendlyName:"owner",
845848
ID:uuid.NewString(),
@@ -853,6 +856,8 @@ func TestAuthorizedAuditLogs(t *testing.T) {
853856
})
854857

855858
t.Run("SingleOrgAuditor",func(t*testing.T) {
859+
t.Parallel()
860+
856861
orgID:=orgIDs[0]
857862
siteAuditorCtx:=dbauthz.As(ctx, rbac.Subject{
858863
FriendlyName:"org-auditor",
@@ -867,6 +872,8 @@ func TestAuthorizedAuditLogs(t *testing.T) {
867872
})
868873

869874
t.Run("TwoOrgAuditors",func(t*testing.T) {
875+
t.Parallel()
876+
870877
first:=orgIDs[0]
871878
second:=orgIDs[1]
872879
siteAuditorCtx:=dbauthz.As(ctx, rbac.Subject{
@@ -882,6 +889,8 @@ func TestAuthorizedAuditLogs(t *testing.T) {
882889
})
883890

884891
t.Run("ErroneousOrg",func(t*testing.T) {
892+
t.Parallel()
893+
885894
siteAuditorCtx:=dbauthz.As(ctx, rbac.Subject{
886895
FriendlyName:"org-auditor",
887896
ID:uuid.NewString(),

‎enterprise/audit/backends/postgres_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ func TestPostgresBackend(t *testing.T) {
3535
})
3636
require.NoError(t,err)
3737
require.Len(t,got,1)
38-
require.Equal(t,alog.ID,got[0].ID)
38+
require.Equal(t,alog.ID,got[0].AuditLog.ID)
3939
})
4040
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp