internal/moduletest: Experimental module testing helpers
As part of ongoing research into Terraform testing we'd like to use an experimental feature to validate our current understanding that expressing tests as part of the Terraform language, as opposed to in some other language run alongside, is a good and viable way to write practical module integration tests. This initial experimental incarnation of that idea is implemented as a provider, just because that's an easier extension point for research purposes than a first-class language feature would be. Whether this would ultimately emerge as a provider similar to this or as custom language constructs will be a matter for future research, if this first experiment confirms that tests written in the Terraform language are the best direction to take. The previous incarnation of this experiment was an externally-developed provider apparentlymart/testing, listed on the Terraform Registry. That helped with showing that there are some useful tests that we can write in the Terraform language, but integrating such a provider into Terraform will allow us to make use of it in the also-experimental "terraform test" command, which will follow in subsequent commits, to see how this might fit into a development workflow.
Showing
+741 -0
... | ... | @@ -114,6 +114,7 @@ require ( |
github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18 // indirect | ||
github.com/xlab/treeprint v0.0.0-20161029104018-1d6e34225557 | ||
github.com/zclconf/go-cty v1.7.1 | ||
github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b | ||
github.com/zclconf/go-cty-yaml v1.0.2 | ||
go.uber.org/atomic v1.3.2 // indirect | ||
go.uber.org/multierr v1.1.0 // indirect | ||
... | ... |
... | ... | @@ -617,6 +617,8 @@ github.com/zclconf/go-cty v1.1.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLE |
github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= | ||
github.com/zclconf/go-cty v1.7.1 h1:AvsC01GMhMLFL8CgEYdHGM+yLnnDOwhPAYcgTkeF0Gw= | ||
github.com/zclconf/go-cty v1.7.1/go.mod h1:VDR4+I79ubFBGm1uJac1226K5yANQFHeauxPBoP54+o= | ||
github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b h1:FosyBZYxY34Wul7O/MSKey3txpPYyCqVO5ZyceuQJEI= | ||
github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= | ||
github.com/zclconf/go-cty-yaml v1.0.2 h1:dNyg4QLTrv2IfJpm7Wtxi55ed5gLGOlPrZ6kMd51hY0= | ||
github.com/zclconf/go-cty-yaml v1.0.2/go.mod h1:IP3Ylp0wQpYm50IHK8OZWKMu6sPJIUgKa8XhiVHura0= | ||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= | ||
... | ... |
internal/moduletest/assertion.go
0 → 100644
internal/moduletest/doc.go
0 → 100644
internal/moduletest/provider.go
0 → 100644
This diff is collapsed.
internal/moduletest/provider_test.go
0 → 100644
Please register or sign in to comment