mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-09-06 23:57:48 +00:00
Merge pull request #16328 from cdoern/config
fix connection usage with containers.conf
This commit is contained in:
commit
e656cf43fe
2 changed files with 7 additions and 0 deletions
|
|
@ -198,6 +198,8 @@ func persistentPreRunE(cmd *cobra.Command, args []string) error {
|
|||
if contextConn != nil && contextConn.Changed {
|
||||
return fmt.Errorf("use of --connection and --context at the same time is not allowed")
|
||||
}
|
||||
// need to give our blank containers.conf all of the service destinations if we are using one.
|
||||
podmanConfig.ContainersConf.Engine.ServiceDestinations = podmanConfig.ContainersConfDefaultsRO.Engine.ServiceDestinations
|
||||
podmanConfig.ContainersConf.Engine.ActiveService = conn.Value.String()
|
||||
if err := setupConnection(); err != nil {
|
||||
return err
|
||||
|
|
|
|||
|
|
@ -276,6 +276,11 @@ var _ = Describe("podman system connection", func() {
|
|||
Expect(session.Out.Contents()).Should(BeEmpty())
|
||||
Expect(session.Err.Contents()).Should(BeEmpty())
|
||||
|
||||
cmd = exec.Command(podmanTest.RemotePodmanBinary,
|
||||
"--connection", "QA", "ps")
|
||||
_, err = Start(cmd, GinkgoWriter, GinkgoWriter)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
||||
uri := url.URL{
|
||||
Scheme: "ssh",
|
||||
User: url.User(u.Username),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue