mirror of
https://github.com/containers/podman.git
synced 2025-06-20 09:03:43 +08:00
Merge pull request #21002 from baude/machinee2edisksize
machine e2e : set default disk size to 11
This commit is contained in:
@ -35,13 +35,15 @@ type initMachine struct {
|
||||
}
|
||||
|
||||
func (i *initMachine) buildCmd(m *machineTestBuilder) []string {
|
||||
diskSize := defaultDiskSize
|
||||
cmd := []string{"machine", "init"}
|
||||
if i.cpus != nil {
|
||||
cmd = append(cmd, "--cpus", strconv.Itoa(int(*i.cpus)))
|
||||
}
|
||||
if i.diskSize != nil {
|
||||
cmd = append(cmd, "--disk-size", strconv.Itoa(int(*i.diskSize)))
|
||||
diskSize = *i.diskSize
|
||||
}
|
||||
cmd = append(cmd, "--disk-size", strconv.Itoa(int(diskSize)))
|
||||
if l := len(i.ignitionPath); l > 0 {
|
||||
cmd = append(cmd, "--ignition-path", i.ignitionPath)
|
||||
}
|
||||
|
@ -25,7 +25,8 @@ func TestMain(m *testing.M) {
|
||||
}
|
||||
|
||||
const (
|
||||
defaultStream = machine.Testing
|
||||
defaultStream = machine.Testing
|
||||
defaultDiskSize uint = 11
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -1,6 +1,7 @@
|
||||
package e2e_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"strings"
|
||||
@ -131,7 +132,7 @@ var _ = Describe("podman machine set", func() {
|
||||
sshSession3, err := mb.setName(name).setCmd(ssh3.withSSHCommand([]string{"sudo", "fdisk", "-l", "|", "grep", "Disk"})).run()
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(sshSession3).To(Exit(0))
|
||||
Expect(sshSession3.outputToString()).To(ContainSubstring("100 GiB"))
|
||||
Expect(sshSession3.outputToString()).To(ContainSubstring(fmt.Sprintf("%d GiB", defaultDiskSize)))
|
||||
})
|
||||
|
||||
It("set rootful with docker sock change", func() {
|
||||
|
Reference in New Issue
Block a user