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

Commit4f1df88

Browse files
authored
fix: Always output job failure reason in provisioner daemon tests (#2850)
This flake can be seen here:https://github.com/coder/coder/runs/7186604615?check_suite_focus=true
1 parent08a781f commit4f1df88

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

‎provisionerd/provisionerd_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -962,6 +962,14 @@ func createProvisionerd(t *testing.T, dialer provisionerd.Dialer, provisioners p
962962
// Creates a provisionerd protobuf client that's connected
963963
// to the server implementation provided.
964964
funccreateProvisionerDaemonClient(t*testing.T,serverprovisionerDaemonTestServer) proto.DRPCProvisionerDaemonClient {
965+
ifserver.failJob==nil {
966+
// Default to asserting the error from the failure, otherwise
967+
// it can be lost in tests!
968+
server.failJob=func(ctx context.Context,job*proto.FailedJob) (*proto.Empty,error) {
969+
assert.Fail(t,job.Error)
970+
return&proto.Empty{},nil
971+
}
972+
}
965973
clientPipe,serverPipe:=provisionersdk.TransportPipe()
966974
t.Cleanup(func() {
967975
_=clientPipe.Close()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp