pulumi/tests
Will Jones 1515db22f1 Support `pulumi.Config` in dynamic providers
As well as responding to `Configure` gRPC calls, a resource provider
binary can also accept configuration from the engine via the
`PULUMI_CONFIG` environment variable. Presently, the engine will only
send configuration namespaced to the provider in question, and will
strip namespaces when doing so. So, given an example host configuration
of:

```
config:
  aws:region: eu-west-1
  foo:bar: baz
```

an `aws` provider will be provided with
`PULUMI_CONFIG='{"region":"eu-west-1"}'`, whereas a `gcp` provider will
receive `PULUMI_CONFIG='{}'`, matching neither `aws:region` nor
`foo:bar`.

This is problematic for dynamic providers, since they are authored in
and typically considered part of the user's program, and not as a
separate entity. Consequently it is not unreasonable for a dynamic
provider author to expect to have access to the entirety of the Pulumi
configuration through e.g. `pulumi.Config`, just like any other code in
their program -- #17050 and #4512 are two examples.

This commit makes us live up to this expectation. Dynamic providers now
receive all configuration values, with the namespaces preserved so that
existing `pulumi.Config` code can work in a dynamic provider like it
works everywhere else.

Fixes #17050
2024-09-10 17:21:20 +01:00
..
benchmarks/go-alias-norm Bump go modules (#16051) 2024-04-25 14:30:00 +00:00
examples Update node sdk to use typescript definitions for grpc and protobufs. (#14415) 2023-12-04 15:22:44 +00:00
integration Support `pulumi.Config` in dynamic providers 2024-09-10 17:21:20 +01:00
testdata [go] Allow output-versioned invokes to resolve and maintain secrets (#17132) 2024-09-09 12:57:43 +00:00
testprovider Support `pulumi.Config` in dynamic providers 2024-09-10 17:21:20 +01: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 Run Environment.DeleteIfNotFailed after tests complete (#16730) 2024-07-23 10:37:01 +00:00
config_test.go [config] Re-enable TestConfigCommandsUsingEnvironments (#16817) 2024-07-30 21:34:14 +00:00
go.mod add debugging support to Go language host (#17102) 2024-09-06 09:49:07 +00:00
go.sum add debugging support to Go language host (#17102) 2024-09-06 09:49:07 +00:00
history_test.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
login_test.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
main_test.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
policy_new_test.go Revert "[policy] support premium policies (#13898)" (#14114) 2023-10-06 09:49:40 +00:00
preview_only_test.go Run Environment.DeleteIfNotFailed after tests complete (#16730) 2024-07-23 10:37:01 +00:00
remote_test.go Use new API for deployments (#15684) 2024-04-16 23:23:56 +00:00
roundtrip_test.go Run Environment.DeleteIfNotFailed after tests complete (#16730) 2024-07-23 10:37:01 +00:00
smoke_test.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
stack_test.go Run Environment.DeleteIfNotFailed after tests complete (#16730) 2024-07-23 10:37:01 +00: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