Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resource/external_volume: fix mount flags parsing #266

Merged
merged 2 commits into from
Jun 6, 2022

Conversation

tgross
Copy link
Member

@tgross tgross commented Apr 25, 2022

Fixes #260

The mount flags parsing tries to cast directly to a slice of strings,
but this silently fails and leaves us with empty mount flags.


I've tested this manually but I need to brush up on how to write Terraform tests because I don't quite understand how it's working in this repo. Putting the PR up for review while I work on that.

The mount flags parsing tries to cast directly to a slice of strings,
but this silently fails and leaves us with empty mount flags.
Copy link
Contributor

@lgfa29 lgfa29 left a comment

Choose a reason for hiding this comment

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

Thanks @tgross!

There's definitely a little bit of art in writing Terraform tests, and this resource didn't have any since it requires a cluster with CSI configured.

I added some basic testing based on the hostpath demo since it's fairly easy to get it running locally with Vagrant.

Though I don't think they will be able to run in CI since it requires privileged Docker access. I will give it a try in a follow-up PR.

@lgfa29 lgfa29 merged commit e1f31fe into main Jun 6, 2022
@lgfa29 lgfa29 deleted the csi-mount-flags-parsing branch June 6, 2022 23:53
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.

CSI volume created using nomad_external_volume resource seems to be missing mount_flags
2 participants