Skip to content

Fix #6962: Add mount trait e2e test - #6970

Merged
squakez merged 2 commits into
apache:mainfrom
Yasas-Sri:feature/6962-mount-trait-e2e
Nov 17, 2026
Merged

squakez merged 2 commits into
apache:mainfrom
Yasas-Sri:feature/6962-mount-trait-e2e

Conversation

@Yasas-Sri

Copy link
Copy Markdown
Contributor

Fixes #6962

Adds an e2e test for the mount trait (e2e/common/traits/mount_test.go). It covers the main trait options. Each mounted value is fed into a simple timer/file route, and the test checks the expected output in the integration logs.

Coverage

  • mount.configs from a ConfigMap: a properties key is interpolated into {{my.message}} and logged.
  • mount.configs from a Secret: same check, with the value coming from a Secret.
  • mount.resources with a filtered key and a destination path (configmap:cm/my-resource.txt@/tmp/mount/my-resource.txt): the route reads and logs the file, and the test checks that the other key in the ConfigMap is not mounted.
  • mount.empty-dirs with a size limit: the route writes a file to the emptyDir and reads it back, and the test checks the volume's sizeLimit on the pod spec.
  • mount.volumes with a dynamic PVC (name:/path:size:accessMode): same write/read round trip, plus a check that the PVC was created.

Notes

  • mount.hot-reload is not covered here because e2e/common/config/config_reload_test.go already covers it.
  • The three small route files under e2e/common/traits/files/mount/ are needed because no existing trait route logs a property or a mounted file.
  • Tests only, no production code changes.

@squakez squakez left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the work. Most of the tests are probably now overriding the ones in /common/config testing. Maybe we can remove them as well.

Comment thread e2e/common/traits/mount_test.go Resolved
Comment thread e2e/common/traits/mount_test.go Resolved
Comment thread e2e/common/traits/mount_test.go Resolved
Comment thread e2e/common/traits/mount_test.go Resolved
@squakez

squakez commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

@Yasas-Sri any possibility to have a look at the PR comments before merging this one? Thanks.

@Yasas-Sri

Copy link
Copy Markdown
Contributor Author

@squakez sorry for the late reply. i have make the changes according to your reivew

@squakez
squakez merged commit 4273a54 into apache:main Nov 17, 2026
17 checks passed
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.

Write a mout trait e2e test

2 participants