mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-08-06 17:40:58 +00:00
fix: use accessors on protobuf messages instead of struct members (#684)
So it does not panic if one is nil. Closes forgejo/runner#146 Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/684 Reviewed-by: Michael Kriese <michael.kriese@gmx.de> Co-authored-by: Earl Warren <contact@earl-warren.org> Co-committed-by: Earl Warren <contact@earl-warren.org>
This commit is contained in:
parent
90a12ccd80
commit
5e3cb5468c
8 changed files with 21 additions and 21 deletions
|
@ -114,5 +114,5 @@ func Test_runCreateRunnerFile(t *testing.T) {
|
|||
)
|
||||
resp, err := cli.FetchTask(ctx, connect.NewRequest(&runnerv1.FetchTaskRequest{}))
|
||||
assert.NoError(t, err)
|
||||
assert.Nil(t, resp.Msg.Task)
|
||||
assert.Nil(t, resp.Msg.GetTask())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue