Disable image pulling when using HIP_VISIBLE_DEVICES, otherwise the large
rocm image will be pulled.
Skip all of the generate tests when --nocontainer is true.
Signed-off-by: Oliver Walsh <owalsh@redhat.com>
Use a ContainerEntryPoint object in exec_args to indicate that
the entrypoint from the container image is used.
If so, skip this first arg when executing container commands and
omit the `command` field from the kube file podspectemplate.
Signed-off-by: Oliver Walsh <owalsh@redhat.com>
Omit the previous command ("binary" in the spec) as the vLLM images use the
entrypoint to run vLLM.
Fix --served-model-name option.
This refered to a non-existant model.model_name ctx variable.
Use model.alias instead.
Use precisely the same model name from the chat client.
vLLM will exit when this is not equal to the served-model-name.
Signed-off-by: Oliver Walsh <owalsh@redhat.com>
If the requested model is missing, "ramalama serve --pull never" will exit with
"Error: <model> does not exist" and returncode 22. To test the behavior of a
non-existent image reference, the requested model must already be available locally.
Signed-off-by: Mike Bonnet <mikeb@redhat.com>
-rag images are only build on x86_64 and arm64 due to missing dependencies
on other architectures.
Unset some environment variables in tests that validate config defaults.
Loosen the checks in a couple tests so that -rag images can be referenced by
digest. Used by Konflux CI when testing unreleased images.
Signed-off-by: Mike Bonnet <mikeb@redhat.com>
Add Podman >= 5.7.0 version requirement for artifact tests
Artifact support requires Podman 5.7.0 or later. This commit adds version
checking to skip artifact tests on systems with older Podman versions.
Changes:
- Add get_podman_version() and skip_if_podman_too_old() functions to test/system/helpers.bash
- Add skip_if_podman_too_old decorator to test/conftest.py for e2e tests
- Apply version check to all artifact-related tests in:
- test/system/056-artifact.bats (BATS tests)
- test/e2e/test_artifact.py (pytest e2e tests)
- Tests will be skipped with clear message on systems with Podman < 5.7.0
- Docker and nocontainer tests are also skipped as they don't support artifacts
The version check extracts the Podman version and compares it numerically,
handling development versions like "5.7.0-dev" correctly.
Cursor-AI-Generated
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Install OpenSSL for Windows CI.
Replace htpasswd cli with bcrypt.
isatty() is True for NUL on Windows but false for /dev/null.
Use a pipe instead for testing tty logic.
Signed-off-by: Oliver Walsh <owalsh@redhat.com>
Fixed a number of instances where posix path were assumed.
xfail all remaining windows test failures, mostly due to lack of fork().
Signed-off-by: Oliver Walsh <owalsh@redhat.com>
Docker does not accept the mount option 'rw=true' in the --mount syntax,
resulting in the error:
invalid argument "...rw=true" for "--mount" flag: unexpected key 'rw' in 'rw=true'
Since read-write is the default behavior for mounts in both Docker and
Podman, the 'rw=true' option can simply be omitted.
Changes:
- Removed 'rw=true' from type=bind mount in add_rag() for DB source
- Removed 'rw=true' from type=image mount in add_rag() for image source
- Updated comment to clarify default behavior
Update tests to remove rw=true mount option checks
Update system and e2e tests to match the removal of the rw=true
mount option in RAG functionality. Since read-write is the default
behavior for mounts, the tests no longer need to check for this
explicit option.
Changes:
- Updated test/system/070-rag.bats: Removed rw=true from mount checks
on lines 62 and 79
- Updated test/system/040-serve.bats: Removed rw=true from mount check
on line 547
- Updated test/e2e/test_serve.py: Removed rw=true from mount assertion
on line 752
This PR was created with the help of Cursor AI.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
- Migrate to e2e pytest the `test/system/040-serve.bats` bat test.
- Create a container registry fixture to test interactions with private
registries.
- The tests cover a wide range of functionalities, including:
- Validation of various CLI arguments and flags.
- Generation of Quadlet and Kubernetes files.
- Serving with different APIs and RAG.
- Error handling for invalid inputs.
Signed-off-by: Roberto Majadas <rmajadas@redhat.com>