terraform/lang/funcs
Kristin Laemmert 394cf7f25e
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
2019-04-29 13:11:28 -04:00
..
testdata lang/funcs: templatefile function 2018-12-21 08:06:14 -08:00
cidr.go port compact function 2018-10-16 18:49:20 -07:00
cidr_test.go port cidr functions 2018-10-16 18:49:20 -07:00
collection.go lang/funcs: add acc tests for functions (#21112) 2019-04-29 13:11:28 -04:00
collection_test.go funcs/coalesce: return the first non-null, non-empty-string element from a sequence (#21002) 2019-04-12 13:57:52 -04:00
conversion.go lang/funcs: Type conversion functions 2019-01-17 10:01:47 -08:00
conversion_test.go lang/funcs: Type conversion functions 2019-01-17 10:01:47 -08:00
crypto.go lang/funcs: Fix filebase64sha256 function hashing algorithm 2019-03-12 12:59:36 -04:00
crypto_test.go lang/funcs: Fix filebase64sha256 function hashing algorithm 2019-03-12 12:59:36 -04:00
datetime.go cleanup comments for nicer godocs 2018-10-16 18:49:20 -07:00
datetime_test.go cleanup comments for nicer godocs 2018-10-16 18:49:20 -07:00
encoding.go base64decode: check that the decoded (not encoded) string is valid UTF-8 2018-10-16 18:49:20 -07:00
encoding_test.go base64decodeFunc now checks for valid UTF-8 2018-10-16 18:49:20 -07:00
filesystem.go lang/funcs: Fix out-of-bounds ArgError in templatefile function 2019-03-19 16:23:51 -07:00
filesystem_test.go lang/funcs: Fix out-of-bounds ArgError in templatefile function 2019-03-19 16:23:51 -07:00
number.go porting functions 2018-10-16 18:49:20 -07:00
number_test.go porting functions 2018-10-16 18:49:20 -07:00
string.go lang/funcs: Fix panic in "join" when an element is null 2019-02-07 14:35:13 -08:00
string_test.go porting many functions 2018-10-16 18:49:20 -07:00