lang/funcs: add acc tests for functions (#21112)

* lang/funcs: testing of functions through the lang package API
The function-specific unit tests do not cover the HCL conversion that happens when the functions are called in a terraform configuration. For e.g., HCL converts sets to lists before passing it to the function. This means that we could not test passing a set in the function _unit_ tests.
This adds a higher-level acceptance test, plus a check that every (pure) function has a test.

* website/docs: update function documentation
This commit is contained in:
Kristin Laemmert
2019-04-29 13:11:28 -04:00
committed by GitHub
parent eed605ac05
commit 394cf7f25e
9 changed files with 905 additions and 12 deletions

12
.tfdev Normal file
View File

@@ -0,0 +1,12 @@
version_info {
commit_var = "main.GitCommit"
version_var = "github.com/hashicorp/terraform/version.Version"
prerelease_var = "github.com/hashicorp/terraform/version.Prerelease"
}
version_exec = false
platform {
os = "darwin"
arch = "amd64"
}