summaryrefslogtreecommitdiff
path: root/pkg/machine/qemu/config_test.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-04-28 16:21:33 -0400
committerGitHub <noreply@github.com>2022-04-28 16:21:33 -0400
commit765c8818e4ad7730b4d1a79bf33c3c3735c0a0e5 (patch)
treef9ba2281b8be875ea10e2bf0f927b1dcad2e1249 /pkg/machine/qemu/config_test.go
parent2e9f792e378491acc3c04ba389ec7cf15bef471e (diff)
parent2902d32c4989a6c391d713fab7eb567eaac9d4cb (diff)
downloadpodman-765c8818e4ad7730b4d1a79bf33c3c3735c0a0e5.tar.gz
podman-765c8818e4ad7730b4d1a79bf33c3c3735c0a0e5.tar.bz2
podman-765c8818e4ad7730b4d1a79bf33c3c3735c0a0e5.zip
Merge pull request #14033 from baude/inspectredo
Refactor machine inspect
Diffstat (limited to 'pkg/machine/qemu/config_test.go')
-rw-r--r--pkg/machine/qemu/config_test.go15
1 files changed, 8 insertions, 7 deletions
diff --git a/pkg/machine/qemu/config_test.go b/pkg/machine/qemu/config_test.go
index 264de9ae8..0fbb5b3bf 100644
--- a/pkg/machine/qemu/config_test.go
+++ b/pkg/machine/qemu/config_test.go
@@ -6,6 +6,7 @@ import (
"reflect"
"testing"
+ "github.com/containers/podman/v4/pkg/machine"
"github.com/containers/podman/v4/test/utils"
)
@@ -37,7 +38,7 @@ func TestMachineFile_GetPath(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
- m := &MachineFile{
+ m := &machine.VMFile{
Path: tt.fields.Path, //nolint: scopelint
Symlink: tt.fields.Symlink, //nolint: scopelint
}
@@ -73,7 +74,7 @@ func TestNewMachineFile(t *testing.T) {
sym := "my.sock"
longSym := filepath.Join(homedir, ".podman", sym)
- m := MachineFile{
+ m := machine.VMFile{
Path: p,
Symlink: nil,
}
@@ -84,7 +85,7 @@ func TestNewMachineFile(t *testing.T) {
tests := []struct {
name string
args args
- want *MachineFile
+ want *machine.VMFile
wantErr bool
}{
{
@@ -96,7 +97,7 @@ func TestNewMachineFile(t *testing.T) {
{
name: "Good with short symlink",
args: args{p, &sym},
- want: &MachineFile{p, nil},
+ want: &machine.VMFile{Path: p},
wantErr: false,
},
{
@@ -114,14 +115,14 @@ func TestNewMachineFile(t *testing.T) {
{
name: "Good with long symlink",
args: args{longp, &sym},
- want: &MachineFile{longp, &longSym},
+ want: &machine.VMFile{Path: longp, Symlink: &longSym},
wantErr: false,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
- got, err := NewMachineFile(tt.args.path, tt.args.symlink) //nolint: scopelint
- if (err != nil) != tt.wantErr { //nolint: scopelint
+ got, err := machine.NewMachineFile(tt.args.path, tt.args.symlink) //nolint: scopelint
+ if (err != nil) != tt.wantErr { //nolint: scopelint
t.Errorf("NewMachineFile() error = %v, wantErr %v", err, tt.wantErr) //nolint: scopelint
return
}