Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sbalbach authored and ITProKyle committed Jan 6, 2020
1 parent a458e26 commit 52fa4a9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
5 changes: 5 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ The grammar and many of the tests/fixtures were copied/ported from the
golang parser into pyhcl. All releases are tested with a variety of
python versions from Python 2.7 onward.

This version has been modified to work with terraform 0.12 syntax.
It should be backward compatible with earlier versions.
It doesn't cover every situation. See discussion in pull request:
https://github.com/virtuald/pyhcl/pull/57

Installation
============

Expand Down
4 changes: 2 additions & 2 deletions tests/fixtures/function.hcl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
data "resource" "object" {
vars = {
cluster_1 = join("\n", data.template_file.cluster_1.*.rendered)
cluster_2 = join("\n", data.template_file.cluster_2.*.rendered)
cluster_3 = format("name_%02d", count.index + 1)
cluster_2 = format("name_%02d", count.index + 1)
PROXY_AUTH = join(":", [var.proxy_username, var.proxy_password])
}
}
6 changes: 3 additions & 3 deletions tests/fixtures/function.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"resource": {
"object": {
"vars": {
"cluster_1": "join(\\n,data.template_file.cluster_1.*.rendered)",
"cluster_2": "join(\\n,data.template_file.cluster_2.*.rendered)",
"cluster_3": "format(name_%02d,count.index + 1)"
"cluster_1": "join('\\n',data.template_file.cluster_1.*.rendered)",
"cluster_2": "format(name_%02d,count.index + 1)",
"PROXY_AUTH": "join(':',var.proxy_username,var.proxy_password)"
}
}
}
Expand Down
1 change: 0 additions & 1 deletion tests/test_decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
('flat.hcl', None, {'foo': 'bar', 'Key': 7}),
('float.hcl', None, {'a': 1.02}),
('float.hcl', 'float.json', None),
('function.hcl', 'function.json', None),
('multiline_bad.hcl', 'multiline.json', None),
('scientific.hcl', 'scientific.json', None),
('structure.hcl', 'structure_flat.json', None),
Expand Down

0 comments on commit 52fa4a9

Please sign in to comment.