We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 380c0e9 commit 814b7b9Copy full SHA for 814b7b9
pkg/pf/tests/autonaming_test.go
@@ -27,7 +27,7 @@ func TestAutonaming(t *testing.T) {
27
},
28
})
29
30
- prov := bridgedProvider(provBuilder)
+ prov := provBuilder.ToProviderInfo()
31
prov.Resources["testprovider_test"] = &tfbridge.ResourceInfo{
32
Tok: "testprovider:index:Test",
33
Fields: map[string]*tfbridge.SchemaInfo{
pkg/pf/tests/config_test.go
@@ -475,7 +475,7 @@ func TestAccProviderConfigureSecretsPluginFramework(t *testing.T) {
475
476
477
478
- bp := bridgedProvider(tfp)
+ bp := tfp.ToProviderInfo()
479
bp.Config = map[string]*info.Schema{
480
"basic_strlist_config": {
481
// Prevent basicStrlistConfigs pluralization
pkg/pf/tests/diff_list_test.go
@@ -237,7 +237,6 @@ func TestDetailedDiffList(t *testing.T) {
237
238
diff := crosstests.Diff(
239
t, res, map[string]cty.Value{"key": initialValue}, map[string]cty.Value{"key": changeValue},
240
- crosstests.DisableAccurateBridgePreview(),
241
)
242
243
autogold.ExpectFile(t, testOutput{
pkg/pf/tests/diff_map_test.go
@@ -187,7 +187,6 @@ func TestDetailedDiffMap(t *testing.T) {
187
188
189
t, schemaValueMakerPair.res, map[string]cty.Value{"key": initialValue}, map[string]cty.Value{"key": changeValue},
190
191
192
193
pkg/pf/tests/diff_object_test.go
@@ -337,10 +337,7 @@ func TestDetailedDiffObject(t *testing.T) {
337
res := pb.NewResource(pb.NewResourceArgs{
338
ResourceSchema: schema.schema,
339
340
- diff := crosstests.Diff(
341
- t, res, initialValue, changeValue,
342
343
- )
+ diff := crosstests.Diff(t, res, initialValue, changeValue)
344
345
initialValue: scenario.initialValue,
346
changeValue: scenario.changeValue,
@@ -360,10 +357,7 @@ func TestDetailedDiffObject(t *testing.T) {
360
357
361
358
362
359
363
364
365
366
367
368
369
pkg/pf/tests/diff_secret_test.go
@@ -32,7 +32,7 @@ func TestSecretBasic(t *testing.T) {
34
35
36
37
program := `
38
name: test
@@ -82,7 +82,7 @@ func TestSecretSet(t *testing.T) {
82
83
84
85
86
87
88
@@ -177,7 +177,7 @@ func TestSecretObjectBlock(t *testing.T) {
177
178
179
180
181
182
183
@@ -273,7 +273,7 @@ func TestSecretPulumiSchema(t *testing.T) {
273
274
275
276
277
278
prov.Resources["testprovider_test"].Fields = map[string]*info.Schema{
279
"s": {Secret: tfbridge0.True()},
pkg/pf/tests/diff_set_test.go
@@ -597,7 +597,6 @@ func TestDetailedDiffSet(t *testing.T) {
597
598
599
600
601
602
603
pkg/pf/tests/diff_test.go
@@ -197,7 +197,6 @@ func TestDetailedDiffStringAttribute(t *testing.T) {
197
198
199
200
201
202
203
pkg/pf/tests/internal/cross-tests/diff.go
@@ -109,8 +109,7 @@ func Diff(t T, res pb.Resource, tfConfig1, tfConfig2 map[string]cty.Value, optio
109
require.NoError(t, err)
110
t.Logf("Pulumi.yaml:\n%s", string(bytes))
111
112
- pt, err := pulcheck.PulCheck(
113
- t, bridgedProvider(prov, bridgedProviderOpts{enableAccurateBridgePreview: !opts.disableAccurateBridgePreview}), string(bytes))
+ pt, err := pulcheck.PulCheck(t, prov.ToProviderInfo(), string(bytes))
114
115
pt.Up(t)
116
@@ -134,8 +133,7 @@ func Diff(t T, res pb.Resource, tfConfig1, tfConfig2 map[string]cty.Value, optio
134
133
}
135
136
type diffOpts struct {
137
- resourceInfo map[string]*info.Schema
138
- disableAccurateBridgePreview bool
+ resourceInfo map[string]*info.Schema
139
140
141
type DiffOption func(*diffOpts)
@@ -144,8 +142,3 @@ type DiffOption func(*diffOpts)
144
142
func DiffProviderInfo(info map[string]*info.Schema) DiffOption {
145
143
return func(o *diffOpts) { o.resourceInfo = info }
146
147
-
148
-// DisableAccurateBridgePreview disables the accurate bridge preview feature.
149
-func DisableAccurateBridgePreview() DiffOption {
150
- return func(o *diffOpts) { o.disableAccurateBridgePreview = true }
151
-}
pkg/pf/tests/internal/cross-tests/util.go
@@ -24,11 +24,6 @@ import (
24
"github.com/pulumi/pulumi/sdk/v3/go/common/resource"
25
26
crosstestsimpl "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/internal/tests/cross-tests/impl"
- "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/pf/internal/providerbuilder"
- "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/pf/tfbridge"
- tfbridge0 "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge"
- "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge/info"
- "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge/tokens"
type T = crosstestsimpl.T
@@ -57,23 +52,3 @@ func skipUnlessLinux(t T) {
57
52
t.Skip("Skipping on non-Linux platforms as our CI does not yet install Terraform CLI required for these tests")
58
53
59
54
60
61
-type bridgedProviderOpts struct {
62
- enableAccurateBridgePreview bool
63
64
65
-func bridgedProvider(prov *providerbuilder.Provider, opts bridgedProviderOpts) info.Provider {
66
- shimProvider := tfbridge.ShimProvider(prov)
67
68
- provider := tfbridge0.ProviderInfo{
69
- P: shimProvider,
70
- Name: prov.TypeName,
71
- Version: prov.Version,
72
- MetadataInfo: &tfbridge0.MetadataInfo{},
73
- EnableAccurateBridgePreview: opts.enableAccurateBridgePreview,
74
- }
75
76
- provider.MustComputeTokens(tokens.SingleModule(prov.TypeName, "index", tokens.MakeStandard(prov.TypeName)))
77
78
- return provider
79
0 commit comments