mirror of
https://github.com/containers/podman.git
synced 2025-11-29 01:28:22 +08:00
Turn PodmanAsUserBase into PodmanExecBaseWithOptions
... replacing the many parameters with a struct with named fields. This makes the meaning of parameters more explicit, and more importantly it makes it easier to just edit _one_ of the parameters without requiring specialized wrappers for every single case. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
@@ -13,6 +13,7 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
. "github.com/containers/podman/v5/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
)
|
||||
@@ -37,14 +38,18 @@ func (p *PodmanTestIntegration) PodmanSystemdScope(args []string) *PodmanSession
|
||||
wrapper = []string{"systemd-run", "--scope", "--user"}
|
||||
}
|
||||
|
||||
podmanSession := p.PodmanAsUserBase(args, 0, 0, "", nil, false, false, wrapper, nil)
|
||||
podmanSession := p.PodmanExecBaseWithOptions(args, PodmanExecOptions{
|
||||
Wrapper: wrapper,
|
||||
})
|
||||
return &PodmanSessionIntegration{podmanSession}
|
||||
}
|
||||
|
||||
// PodmanExtraFiles is the exec call to podman on the filesystem and passes down extra files
|
||||
func (p *PodmanTestIntegration) PodmanExtraFiles(args []string, extraFiles []*os.File) *PodmanSessionIntegration {
|
||||
args = p.makeOptions(args, false, false)
|
||||
podmanSession := p.PodmanAsUserBase(args, 0, 0, "", nil, false, false, nil, extraFiles)
|
||||
podmanSession := p.PodmanExecBaseWithOptions(args, PodmanExecOptions{
|
||||
ExtraFiles: extraFiles,
|
||||
})
|
||||
return &PodmanSessionIntegration{podmanSession}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user