mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
Create pkg/machine/ignition
package
Moves all of the ignitionfiles out of the `machine` package and into its own called `ignition`. This required `VMType` to get moved out of the `machine` package and into the `define` package in order to prevent a circular dependency. Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
This commit is contained in:
@ -8,7 +8,6 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/containers/podman/v4/pkg/machine"
|
||||
"github.com/containers/podman/v4/pkg/machine/define"
|
||||
"github.com/containers/podman/v4/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
@ -80,7 +79,7 @@ var _ = Describe("podman machine init", func() {
|
||||
|
||||
testMachine := inspectBefore[0]
|
||||
Expect(testMachine.Name).To(Equal(mb.names[0]))
|
||||
if testProvider.VMType() != machine.WSLVirt { // WSL hardware specs are hardcoded
|
||||
if testProvider.VMType() != define.WSLVirt { // WSL hardware specs are hardcoded
|
||||
Expect(testMachine.Resources.CPUs).To(Equal(uint64(cpus)))
|
||||
Expect(testMachine.Resources.Memory).To(Equal(uint64(2048)))
|
||||
}
|
||||
@ -136,7 +135,7 @@ var _ = Describe("podman machine init", func() {
|
||||
Expect(inspectBefore).ToNot(BeEmpty())
|
||||
testMachine := inspectBefore[0]
|
||||
Expect(testMachine.Name).To(Equal(mb.names[0]))
|
||||
if testProvider.VMType() != machine.WSLVirt { // memory and cpus something we cannot set with WSL
|
||||
if testProvider.VMType() != define.WSLVirt { // memory and cpus something we cannot set with WSL
|
||||
Expect(testMachine.Resources.CPUs).To(Equal(uint64(cpus)))
|
||||
Expect(testMachine.Resources.Memory).To(Equal(uint64(2048)))
|
||||
}
|
||||
@ -186,7 +185,7 @@ var _ = Describe("podman machine init", func() {
|
||||
})
|
||||
|
||||
It("machine init with volume", func() {
|
||||
if testProvider.VMType() == machine.HyperVVirt {
|
||||
if testProvider.VMType() == define.HyperVVirt {
|
||||
Skip("volumes are not supported on hyperv yet")
|
||||
}
|
||||
skipIfWSL("WSL volumes are much different. This test will not pass as is")
|
||||
@ -262,7 +261,7 @@ var _ = Describe("podman machine init", func() {
|
||||
})
|
||||
|
||||
It("init with user mode networking", func() {
|
||||
if testProvider.VMType() != machine.WSLVirt {
|
||||
if testProvider.VMType() != define.WSLVirt {
|
||||
Skip("test is only supported by WSL")
|
||||
}
|
||||
i := new(initMachine)
|
||||
@ -327,7 +326,7 @@ var _ = Describe("podman machine init", func() {
|
||||
Expect(err).To(HaveOccurred())
|
||||
|
||||
// WSL does not use ignition
|
||||
if testProvider.VMType() != machine.WSLVirt {
|
||||
if testProvider.VMType() != define.WSLVirt {
|
||||
_, err = os.Stat(ign)
|
||||
Expect(err).To(HaveOccurred())
|
||||
}
|
||||
|
Reference in New Issue
Block a user