mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-09-05 18:40:59 +00:00
chore: refactor GetBindsAndMounts to have a context.Context arg
This commit is contained in:
parent
159c6af0dd
commit
f392ec4caa
4 changed files with 6 additions and 6 deletions
|
@ -219,7 +219,7 @@ func TestRunContext_GetBindsAndMounts(t *testing.T) {
|
|||
config := testcase.rc.Config
|
||||
config.Workdir = testcase.name
|
||||
config.BindWorkdir = bindWorkDir
|
||||
gotbind, gotmount, _ := rctemplate.GetBindsAndMounts()
|
||||
gotbind, gotmount, _ := rctemplate.GetBindsAndMounts(t.Context())
|
||||
|
||||
// Name binds/mounts are either/or
|
||||
if config.BindWorkdir {
|
||||
|
@ -271,7 +271,7 @@ func TestRunContext_GetBindsAndMounts(t *testing.T) {
|
|||
rc.Run.JobID = "job1"
|
||||
rc.Run.Workflow.Jobs = map[string]*model.Job{"job1": job}
|
||||
|
||||
gotbind, gotmount, _ := rc.GetBindsAndMounts()
|
||||
gotbind, gotmount, _ := rc.GetBindsAndMounts(t.Context())
|
||||
|
||||
if len(testcase.wantbind) > 0 {
|
||||
assert.Contains(t, gotbind, testcase.wantbind)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue