testvol: return error in Path endpoint when volume is unmounted - #29302
testvol: return error in Path endpoint when volume is unmounted#29302prayag0one4 wants to merge 1 commit into
Conversation
|
Sure, LGTM @Luap99 Are we running unit tests in the test/ directory? |
I think so but we would need to check the logs. |
Luap99
left a comment
There was a problem hiding this comment.
Note changing the content of the test/testvol does nothing since there is no automation to publish the new image.
A maintainer with push access would need to build/publish a new image with make volume-plugin-test-img and push that and then update the image reference here to actually verify this passes e2e tests, until this happens it cannot be merged
Also please see https://github.com/podman-container-tools/podman/blob/main/LLM_POLICY.md
PR descriptions like that are useless, I can see what files were changed by looking at the diff.
| "github.com/docker/go-plugins-helpers/volume" | ||
| ) | ||
|
|
||
| func TestPathUnmountedVolume(t *testing.T) { |
There was a problem hiding this comment.
I don't see the point of the test tbh, this is already a test only code which is only run in e2e.
|
Thanks for review @Luap99 ! |
|
LGTM |
|
Please squash your commits and we can merge |
Check if volume has active mounts in Path() endpoint and return an error if unmounted, resolving TODO. Signed-off-by: Prayag <rajprayag014@gmail.com>
8a4a8c8 to
72f7cc4
Compare
|
squashed into single commit. |
|
LGTM |
This updates the
testvolmock driver'sPath()endpoint to verify if a volume is actually mounted before returning a path. If the volume has no active mounts, it now correctly returns an error instead of a fake path, resolving the existing TODO intest/testvol/main.go.