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

Better plugin configuration patterns / guidelines. #5516

Open
edwbuck opened this issue Sep 23, 2024 · 0 comments
Open

Better plugin configuration patterns / guidelines. #5516

edwbuck opened this issue Sep 23, 2024 · 0 comments
Labels
priority/backlog Issue is approved and in the backlog unscoped The issue needs more design or understanding in order for the work to progress

Comments

@edwbuck
Copy link
Contributor

edwbuck commented Sep 23, 2024

The unit tests for the SPIRE built-in plugins all have some form of unit testing; but, the patterns established in the unit testing are varied:

  • Some test based on a mock gRPC request struct.
  • Some test based on passing a CoreConfig struct in the testing table.
  • Some test based on passing a trustDomain string to be parsed and used with plugintest.CoreConfig(...)
  • Some initialize the plugin in a separate block prior to being configured.
  • Some combine plugin configuration into one block.

About the only item that's mostly consistent is that the plugin's config is passed as a string.

I recommend that this Issue capture the desired testing interface which would support all of the common configuration testing scenarios, facilitating a better and more consistent means of plugin configuration testing.

This should also extend into the realm of creating a simple to use Validation testing interface, so we can have a consistent plugin testing experience.

Lack of consistency in plugin testing was detected in #5303

If we keep testing more consistent between built-in plugins, it would be easier to focus on configuration permutations, option coverage, etc.

@azdagron azdagron added priority/backlog Issue is approved and in the backlog unscoped The issue needs more design or understanding in order for the work to progress labels Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/backlog Issue is approved and in the backlog unscoped The issue needs more design or understanding in order for the work to progress
Projects
None yet
Development

No branches or pull requests

2 participants