aboutsummaryrefslogtreecommitdiff
path: root/pkg/machine/e2e/list_test.go
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2022-07-07 14:13:26 +0200
committerPaul Holzinger <pholzing@redhat.com>2022-07-07 20:48:28 +0200
commit4374038cc67405e3f5555b1870d5bb7f6570fa5d (patch)
tree4a4bbc64c1495563715ff9609c909dd574c78f19 /pkg/machine/e2e/list_test.go
parent4cfa8ccb27ba642fc78b37fa733fcd0d6271ad0f (diff)
downloadpodman-4374038cc67405e3f5555b1870d5bb7f6570fa5d.tar.gz
podman-4374038cc67405e3f5555b1870d5bb7f6570fa5d.tar.bz2
podman-4374038cc67405e3f5555b1870d5bb7f6570fa5d.zip
pkg/machine/e2e: do not import from cmd/podman
It should be avoided to import cmd/podman/... packages from outside of cmd/podman. This can lead in weird hard to debug import paths but also can have negative consequences when imported in unit tests. In this case it will set XDG_CONFIG_HOME and thus the machine tests this dir over the tmp HOME env variable which is set at a later point. This caused machine files to be leaked into the actual users home dir. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'pkg/machine/e2e/list_test.go')
-rw-r--r--pkg/machine/e2e/list_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/machine/e2e/list_test.go b/pkg/machine/e2e/list_test.go
index f12fcbd11..9e3e9956c 100644
--- a/pkg/machine/e2e/list_test.go
+++ b/pkg/machine/e2e/list_test.go
@@ -5,7 +5,7 @@ import (
"time"
"github.com/containers/common/pkg/util"
- "github.com/containers/podman/v4/cmd/podman/machine"
+ "github.com/containers/podman/v4/pkg/domain/entities"
jsoniter "github.com/json-iterator/go"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
@@ -134,7 +134,7 @@ var _ = Describe("podman machine list", func() {
Expect(err).To(BeNil())
Expect(listSession2).To(Exit(0))
- var listResponse []*machine.ListReporter
+ var listResponse []*entities.ListReporter
err = jsoniter.Unmarshal(listSession.Bytes(), &listResponse)
Expect(err).To(BeNil())