Skip to content

test: simple unit test for file functions - #85

Closed
Emyrk wants to merge 1 commit into
mainfrom
stevenmasley/disk
Closed

test: simple unit test for file functions#85
Emyrk wants to merge 1 commit into
mainfrom
stevenmasley/disk

Conversation

@Emyrk

@Emyrk Emyrk commented Apr 16, 2025

Copy link
Copy Markdown
Member

No description provided.

Emyrk added a commit that referenced this pull request Sep 10, 2026
Revives the diskaccess fixture from #85 against the current harness: the
in-tree file is read and used as the default, the escaping path yields an
unknown option and an invalid-options diagnostic.
@Emyrk Emyrk closed this Sep 10, 2026
Emyrk added a commit that referenced this pull request Sep 10, 2026
…223)

Pins the parameter, preset, and tag values that flow from `resource`
blocks, ahead of #221 (which evaluates only the parameter/preset/tag
closure via coder/trivy#74). Everything passes on `main`, where nothing
is pruned, so a failure after rebasing #221 means pruning dropped a
resource a target depends on.

- `testdata/resourceclosure`: the fixture from #221 plus conditional,
`try()`, expression index, `option` and `dynamic "option"` blocks,
`count` on a target, a data-source intermediary, tag -> resource ->
parameter, preset `prebuilds`, and a local module.
- `testdata/resourceclosurejson`: a `.tf.json` template with two
resources in one expression. This currently fails against the #221 pin
(second resource pruned, default unknown); see the [comment on
coder/trivy#74](coder/trivy#74 (comment)).

- `testdata/diskaccess`: revives #85. `file()` on an in-tree path is
read; a path escaping the template root is unknown and flags the option
as invalid. Not closure-related, but a cheap guard that resource pruning
does not disturb function evaluation against the template fs.

- `testdata/chain`: revives #164. Pins two-hop count chaining: a
parameter count-gated on a count-gated parameter's `[0].value` is
silently dropped today because its count is evaluated before the input
flows in. The vector asserts current behavior and the comment says how
to flip it once fixed.

Prepared with Coder Agents assistance.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant