pulumi/tests
bors[bot] bb1964f4ec
Merge #13120
13120: Make convert more lenient r=Frassle a=Frassle

<!--- 
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

<!--- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. -->

Fixes https://github.com/pulumi/pulumi/issues/13117

This adds a new "--strict" flag to `pulumi convert` which defaults to false. When strict is NOT set we bind the PCL with the extra options of `SkipResourceTypechecking`, `AllowMissingVariables`, and `AllowMissingProperties`. This will change some errors to warnings in code generation.

The `strict` flag is sent over the gRPC interface to the Go/Node plugins for their `GenerateProject` methods as they have to do PCL binding plugin side currently.

## 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. -->
- [x] I have added tests that prove my fix is effective or that my feature works
<!--- 
User-facing changes require a CHANGELOG entry.
-->
- [x] 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. -->


Co-authored-by: Fraser Waters <fraser@pulumi.com>
2023-06-08 10:18:42 +00:00
..
benchmarks/go-alias-norm all: cloudflare/circl 1.1.0 => 1.3.3 2023-05-11 13:51:01 -07:00
examples Rename "Smoke" test to "Acceptance" tests 2023-01-30 15:38:37 -05:00
integration Merge #12856 2023-06-01 17:10:29 +00:00
testdata Make convert more lenient 2023-06-08 11:14:31 +01:00
testprovider all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
.gitignore ci: Use reduced smoke testing on Windows & macOS targets 2022-09-21 09:55:06 -07:00
README.md Rename "Smoke" test to "Acceptance" tests 2023-01-30 15:38:37 -05:00
about_test.go test: fix regex used to test Go version output in about command. (#10499) 2022-08-29 11:53:03 -07:00
config_test.go filestate: Re-add project support 2023-03-31 13:21:36 -07:00
go.mod Upgraded pulumi-java go dependency to v0.9.4 2023-06-07 14:53:14 -07:00
go.sum Upgraded pulumi-java go dependency to v0.9.4 2023-06-07 14:53:14 -07:00
history_test.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
login_test.go ci: radical idea - what if slow tests & no stdout makes GH consider runner dead? 2022-03-06 14:52:13 -08:00
main_test.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
remote_test.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
roundtrip_test.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
smoke_test.go Make convert more lenient 2023-06-08 11:14:31 +01:00
stack_test.go Support 'pulumi:tags' config to set stack tags 2023-05-24 09:02:22 +01:00

README.md

Integration Tests

This module provides integration tests for the Pulumi CLI.

The tests can be run via:

make test_all

Usage of Go build tags

In order to speed up integration tests in GitHub actions, Go build tags are used to conditionally compile the desired test cases.

// integration_nodejs_test.go
//go:build (nodejs || all) && !xplatform-acceptance

// integration_nodejs_acceptance_test.go
//go:build nodejs || all