glamorous-kangaroo-20427
12/10/2024, 1:39 AMmicroscopic-river-74022
12/10/2024, 1:39 AMmicroscopic-river-74022
12/10/2024, 1:39 AMspec.files
field to specify POSIX-style paths to YAML files containing manifests for your test pod. These files can include Garden template strings, which will be resolved before the manifests are processed. This allows you to include local files in your test pod configuration.
yaml
spec:
files:
- path/to/your/test-manifest.yaml
Reference: kubernetes-pod Test Configuration ()
2. Using spec.volumes
with `hostPath`:
Although it's generally discouraged due to potential compatibility issues across platforms and providers, you can use hostPath
to mount local directories or files into your test container.
yaml
spec:
volumes:
- hostPath: "/path/to/local/files"
Reference: container Test Configuration ()
It's important to note that using hostPath
is not recommended for portability reasons. Some providers may not support it at all.
For a more reliable and recommended approach to handling data in tests, consider using Garden's artifact system or persistent volume claims. You can generate files via a Run action, store them as artifacts, and then access them in your tests. Alternatively, you can use the persistentvolumeclaim
action type to store and share data across actions.
FAQ: Volumes and Data ()
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------microscopic-river-74022
12/10/2024, 1:39 AM