summaryrefslogtreecommitdiff
path: root/pkg/machine/e2e/set_test.go
diff options
context:
space:
mode:
authorBrent Baude <bbaude@redhat.com>2022-06-30 14:08:05 -0500
committerBrent Baude <bbaude@redhat.com>2022-07-08 08:22:49 -0500
commit76d887c7702321894c28a7479e696ef45f36143c (patch)
treeb025322469b3fa44df2f45f46cbc6c0763b59f3f /pkg/machine/e2e/set_test.go
parent6087fb2116aaeae995e8423872ffe637e8be128f (diff)
downloadpodman-76d887c7702321894c28a7479e696ef45f36143c.tar.gz
podman-76d887c7702321894c28a7479e696ef45f36143c.tar.bz2
podman-76d887c7702321894c28a7479e696ef45f36143c.zip
Fix machine tests
Catch up with regressions that have occurred since the tests were originally written. Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/machine/e2e/set_test.go')
-rw-r--r--pkg/machine/e2e/set_test.go13
1 files changed, 11 insertions, 2 deletions
diff --git a/pkg/machine/e2e/set_test.go b/pkg/machine/e2e/set_test.go
index 15215a44d..80cb89488 100644
--- a/pkg/machine/e2e/set_test.go
+++ b/pkg/machine/e2e/set_test.go
@@ -1,6 +1,8 @@
package e2e
import (
+ "runtime"
+
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
@@ -57,8 +59,15 @@ var _ = Describe("podman machine set", func() {
memorySession, err := mb.setName(name).setCmd(sshMemory.withSSHComand([]string{"cat", "/proc/meminfo", "|", "numfmt", "--field", "2", "--from-unit=Ki", "--to-unit=Mi", "|", "sed", "'s/ kB/M/g'", "|", "grep", "MemTotal"})).run()
Expect(err).To(BeNil())
Expect(memorySession).To(Exit(0))
- Expect(memorySession.outputToString()).To(ContainSubstring("3824"))
-
+ switch runtime.GOOS {
+ // it seems macos and linux handle memory differently
+ case "linux":
+ Expect(memorySession.outputToString()).To(ContainSubstring("3821"))
+ case "darwin":
+ Expect(memorySession.outputToString()).To(ContainSubstring("3824"))
+ default:
+ // windows can go here if we ever run tests there
+ }
// Setting a running machine results in 125
runner, err := mb.setName(name).setCmd(set.withCPUs(4)).run()
Expect(err).To(BeNil())