summaryrefslogtreecommitdiff
path: root/pkg/machine/e2e/set_test.go
diff options
context:
space:
mode:
authoropenshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com>2022-07-08 15:33:29 +0000
committerGitHub <noreply@github.com>2022-07-08 15:33:29 +0000
commit80f0ead64ab8a9998c2486ceeaf4e994821c9498 (patch)
tree3b535fea1ccce9b471a6b193ce1ba185d3e5d43f /pkg/machine/e2e/set_test.go
parentcc6aac5be7953a5660d84d8e601ce418016e1ff3 (diff)
parent76d887c7702321894c28a7479e696ef45f36143c (diff)
downloadpodman-80f0ead64ab8a9998c2486ceeaf4e994821c9498.tar.gz
podman-80f0ead64ab8a9998c2486ceeaf4e994821c9498.tar.bz2
podman-80f0ead64ab8a9998c2486ceeaf4e994821c9498.zip
Merge pull request #14853 from baude/machinetestsfix
Fix machine tests
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())