Skip to content

Really run the container in the 04-runtime.bats.#597

Merged
jnovy merged 1 commit intocontainers:mainfrom
jankaluza:runtime-tests
Sep 15, 2025
Merged

Really run the container in the 04-runtime.bats.#597
jnovy merged 1 commit intocontainers:mainfrom
jankaluza:runtime-tests

Conversation

@jankaluza
Copy link
Member

Previously, the conmon has been tested in the 04-runtime.bats, but we never tried to really run the container defined by the conmon. It was therefore not clear whether the conmon configure the runc correctly and whether the logs are really forwarded where they should be.

This commit changes it by running the runc start. The sleep based waiting login is replaced by polling of runc state to detect the container created and stopped states - this makes tests faster and more reliable.

The assert helper method to compare strings is borrowed from the podman project as it is.

The container cleanup on completion test is removed, since it does not test anything not tested by the previous tests.

@jankaluza
Copy link
Member Author

@jnovy @haircommander

@jankaluza
Copy link
Member Author

Nah, I will have to debug why the Build fails in the CI. It's probably missing some dependency, but I will get back to it on Monday.

@jankaluza jankaluza force-pushed the runtime-tests branch 5 times, most recently from 7a68409 to 0375b4c Compare September 15, 2025 04:56
@jankaluza
Copy link
Member Author

@jnovy , @haircommander , this is ready for a review. I'm still not sure why cri-o tests fail, but I'm quite sure it is not caused by this PR, since it only touches the tests and not any conmon code.

Previously, the conmon has been tested in the 04-runtime.bats, but
we never tried to really run the container defined by the conmon.
It was therefore not clear whether the conmon configure the runc
correctly and whether the logs are really forwarded where they should
be.

This commit changes it by running the `runc start`. The `sleep` based
waiting login is replaced by polling of `runc state` to detect the
container `created` and `stopped` states - this makes tests faster
and more reliable.

The `assert` helper method to compare strings is borrowed from
the podman project as it is.

The `container cleanup on completion` test is removed, since it does
not test anything not tested by the previous tests.

Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
@jnovy jnovy merged commit 72b8d0d into containers:main Sep 15, 2025
34 checks passed
@jnovy
Copy link
Collaborator

jnovy commented Sep 15, 2025

Merged, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants