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

Switch reimplemented runner helper into real TFLint plugin server for testing #64

Open
wata727 opened this issue Sep 12, 2020 · 0 comments

Comments

@wata727
Copy link
Member

wata727 commented Sep 12, 2020

Currently, we provide TestRunner for plugin developers to test its plugin. This Runner is not a real RPC client, but a dummy that mimics the behavior. The problem with this method is that we need to reimplement the Terraform's configuration loading.

To reduce the hassle of reimplementing, launch the actual TFLint plugin server process, and use it. To achieve this, it is necessary to add features on the TFLint side.

richardTowers added a commit to richardTowers/tflint-plugin-sdk that referenced this issue Jan 23, 2021
I'm working on a plugin which checks that resource names include
`${terraform.workspace}` (if it's set) -
https://github.com/richardTowers/tflint-ruleset-workspaces/

Currently it's not possible to test this functionality, because (unlike
tflint) tflint-plugin-sdk doesn't support the `${terraform.workspace}`
expression.

Fixing terraform-linters#64
would be nicer, but as this is quite self contained I think it's okay to
add this feature to the TestRunner.
wata727 pushed a commit that referenced this issue Jan 24, 2021
I'm working on a plugin which checks that resource names include
`${terraform.workspace}` (if it's set) -
https://github.com/richardTowers/tflint-ruleset-workspaces/

Currently it's not possible to test this functionality, because (unlike
tflint) tflint-plugin-sdk doesn't support the `${terraform.workspace}`
expression.

Fixing #64
would be nicer, but as this is quite self contained I think it's okay to
add this feature to the TestRunner.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant