Commit graph

9 commits

Author SHA1 Message Date
Ashley Cui c7c00ce551 Add more machine tests
Add more machine tests for flags in init, inspect, and list.

Signed-off-by: Ashley Cui <acui@redhat.com>
2022-05-10 14:56:13 -04:00
Jhon Honce 88015cf0d8 Implement --format for machine inspect
* Fix issue of nil pointer derefence

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2022-05-03 16:15:59 -07:00
OpenShift Merge Robot b2725024f8
Merge pull request #14024 from cdoern/machine
podman machine starting test
2022-04-28 13:59:23 -04:00
cdoern c721acf082 podman machine starting test
add a test to make sure machines are not running while still starting
in order to do this, I added a parameter to `run()` to delineate whether
or not the command should block or not. The non blocking run allows for tests
to get and use the `machineSession` pointer and check the exit code to see if it has finished.

also fix a bug (created by #13996) that before started, the machines would
always say "LastUp" and "Created" Less than one second ago

Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
2022-04-27 20:12:43 -04:00
Brent Baude 83a75d2a3d Produce better test error messages
As Ed has pointed out, the form of Expect(session).To(Exit(0)) provides
much better error messages.  Let's make Ed happy.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2022-04-27 15:44:02 -05:00
OpenShift Merge Robot 60d6cc8e1e
Merge pull request #13953 from ashley-cui/mach
Allow changing of CPUs, Memory, and Disk Size
2022-04-27 16:02:57 -04:00
Ashley Cui e7390f30b9 Allow changing of CPUs, Memory, and Disk Size
Allow podman machine set to change CPUs, Memory and Disk size of a QEMU machine after its been created.
Disk size can only be increased.

If one setting fails to be changed, the other settings will still be applied.

Signed-off-by: Ashley Cui <acui@redhat.com>
2022-04-27 13:56:14 -04:00
Daniel J Walsh 7259a6315c
Truncate annotations when generating kubernetes yaml files
Kubernetes only allows 63 characters in an annotation.  Make sure
that we only add 63 or less charaters when generating kube. Warn
if containers or pods have longer length and truncate.

Discussion: https://github.com/containers/podman/discussions/13901

Fixes: https://github.com/containers/podman/issues/13962

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-04-27 04:39:05 -04:00
Brent Baude 833456e079 Add podman machine test suite
This PR introduces a test suite for podman machine.  It can currently be
run on developers' local machines and is not part of the official CI
testing; however, the expectation is that any work on machine should
come with an accompanying test.

At present, the test must be run on Linux.  It is untested on Darwin.
There is no Makefile target for the test.  It can be run like `ginkgo -v
pkg/machine/test/.`.  It should be run as a unprivileged user.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2022-04-25 13:05:35 -05:00