Lightning Talk: Testing an OpenTofu Provider or Testing With an OpenTofu Provider
summary
Argues that provider testing needs plan-only acceptance tests for fast validation and a few full system tests that actually exercise the target (not just state), noting a VM deploy often takes 10–15 seconds; recommends using the plugin testing helper to generate acceptance tests, run plan to check errors, and run full tests that perform SSH/HTTP checks and deploy a hello‑world inside a cluster to verify networking and load‑balancer behavior. Claims pure unit tests are awkward because provider hooks are not pure functions.
AI-written summary · about
chapters (6)
- 0:00Introduction
- 0:46OpenTofu provider system
- 3:19Testing pyramid for providers
- 6:52Testing provider vs system
- 7:57System level validations
- 10:08Summary and best practices
related talks
47mInfrastructure Testing explained
44mTesting: Integration Tests - The good, bad and ugly
46mTesting the untestable - patterns and use cases analysis
57mAdvanced Testing Techniques: Tips from the trenches
40mIntegration Testing from the Trenches - Rebooted
37mClean Test Code
19mAutomatic Testing for Services at Scale
37mUnderstanding the successes and the pain points of different testing strategies
