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

Commit1db2b12

Browse files
authored
chore: add a test to ensure audit code works with AGPL (#6561)
Fixes the regression seen in v0.19.1.
1 parent7eb2c2f commit1db2b12

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

‎enterprise/coderd/coderd_test.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,27 @@ func TestAuditLogging(t *testing.T) {
204204
t.Logf("%T = %T",auditor,ea)
205205
assert.Equal(t,reflect.ValueOf(ea).Type(),reflect.ValueOf(auditor).Type())
206206
})
207+
// The AGPL code runs with a fake auditor that doesn't represent the real implementation.
208+
// We do a simple test to ensure that basic flows function.
209+
t.Run("FullBuild",func(t*testing.T) {
210+
t.Parallel()
211+
ctx,cancelFunc:=testutil.Context(t)
212+
defercancelFunc()
213+
client:=coderdenttest.New(t,&coderdenttest.Options{
214+
Options:&coderdtest.Options{
215+
IncludeProvisionerDaemon:true,
216+
},
217+
})
218+
user:=coderdtest.CreateFirstUser(t,client)
219+
workspace,agent:=setupWorkspaceAgent(t,client,user,0)
220+
conn,err:=client.DialWorkspaceAgent(ctx,agent.ID,nil)
221+
require.NoError(t,err)
222+
deferconn.Close()
223+
connected:=conn.AwaitReachable(ctx)
224+
require.True(t,connected)
225+
build:=coderdtest.CreateWorkspaceBuild(t,client,workspace,database.WorkspaceTransitionStop)
226+
coderdtest.AwaitWorkspaceBuildJob(t,client,build.ID)
227+
})
207228
}
208229

209230
// testDBAuthzRole returns a context with a subject that has a role

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp