Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix require reading JSON files #12302

Merged
merged 1 commit into from Mar 1, 2023
Merged

Fix require reading JSON files #12302

merged 1 commit into from Mar 1, 2023

Conversation

Frassle
Copy link
Member

@Frassle Frassle commented Feb 28, 2023

Description

Fixes #12301

Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • I have run make changelog and committed the changelog/pending/<file> documenting my change
  • Yes, there are changes in this PR that warrants bumping the Pulumi Service API version

@pulumi-bot
Copy link
Contributor

Changelog

[uncommitted] (2023-02-28)

Bug Fixes

  • [sdk/nodejs] Fix stack outputs picking up co-located JSON files.
    #12302

@Frassle Frassle marked this pull request as ready for review February 28, 2023 21:26
Comment on lines +1329 to +1330
assert.Contains(t, stack.Outputs, "bar")
assert.Equal(t, 3.0, stack.Outputs["bar"].(float64))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

optional: we can collapse this into a single equals check:

Suggested change
assert.Contains(t, stack.Outputs, "bar")
assert.Equal(t, 3.0, stack.Outputs["bar"].(float64))
assert.Equal(t, map[string]any{"bar": float64(3)}, stack.Outputs)

@Frassle
Copy link
Member Author

Frassle commented Mar 1, 2023

bors merge

@bors
Copy link
Contributor

bors bot commented Mar 1, 2023

Build succeeded:

@bors bors bot merged commit 4f10118 into master Mar 1, 2023
@bors bors bot deleted the fraser/nodeJsonSlurp branch March 1, 2023 20:23
github-merge-queue bot pushed a commit that referenced this pull request Dec 4, 2023
<!--- 
Thanks so much for your contribution! If this is your first time
contributing, please ensure that you have read the
[CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md)
documentation.
-->

# Description
This PR fixes a small problem with ProgramTest, that the `With` function
doesn't propagate the `PostPrepareProject` option as it should. e.g.

```go
	options := baseOptions.With(integration.ProgramTestOptions{
		PostPrepareProject: func(p *engine.Projinfo) error {
			// ...
		},
	})
```

A follow-up to: #12302

## Checklist

- [x] I have run `make tidy` to update any new dependencies
- [x] I have run `make lint` to verify my code passes the lint check
  - [ ] I have formatted my code using `gofumpt`

<!--- Please provide details if the checkbox below is to be left
unchecked. -->
- [ ] I have added tests that prove my fix is effective or that my
feature works
<!--- 
User-facing changes require a CHANGELOG entry.
-->
- [ ] I have run `make changelog` and committed the
`changelog/pending/<file>` documenting my change
<!--
If the change(s) in this PR is a modification of an existing call to the
Pulumi Cloud,
then the service should honor older versions of the CLI where this
change would not exist.
You must then bump the API version in
/pkg/backend/httpstate/client/api.go, as well as add
it to the service.
-->
- [ ] Yes, there are changes in this PR that warrants bumping the Pulumi
Cloud API version
<!-- @pulumi employees: If yes, you must submit corresponding changes in
the service repo. -->
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.

Pulumi stack outputs slurp a JSON file
3 participants