@@ -3,6 +3,7 @@ package tfbridgetests
33import (
44 "context"
55 "fmt"
6+ "os"
67 "testing"
78
89 "github.com/hashicorp/terraform-plugin-framework/attr"
@@ -11,16 +12,22 @@ import (
1112 "github.com/hashicorp/terraform-plugin-framework/types"
1213 "github.com/hashicorp/terraform-plugin-go/tfprotov6"
1314 "github.com/hashicorp/terraform-plugin-go/tftypes"
15+ "github.com/pulumi/pulumi/sdk/v3/go/common/util/cmdutil"
1416 "github.com/zclconf/go-cty/cty"
1517
1618 pb "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/pf/internal/providerbuilder"
1719 crosstests "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/pf/tests/internal/cross-tests"
1820)
1921
22+ func skipUnlessDeltasEnabled (t * testing.T ) {
23+ if d , ok := os .LookupEnv ("PULUMI_RAW_STATE_DELTA_ENABLED" ); ! ok || ! cmdutil .IsTruthy (d ) {
24+ t .Skip ("This test requires PULUMI_RAW_STATE_DELTA_ENABLED=true environment" )
25+ }
26+ }
27+
2028func TestPFUpgradeRenamedProp (t * testing.T ) {
21- // TODO[pulumi/pulumi-terraform-bridge#2960]
22- t .Skip ("State upgrades are broken" )
2329 t .Parallel ()
30+ skipUnlessDeltasEnabled (t )
2431
2532 dataV0 := tftypes.Object {
2633 AttributeTypes : map [string ]tftypes.Type {
@@ -91,9 +98,8 @@ func TestPFUpgradeRenamedProp(t *testing.T) {
9198}
9299
93100func TestPFUpgradeMovedProp (t * testing.T ) {
94- // TODO[pulumi/pulumi-terraform-bridge#2960]
95- t .Skip ("State upgrades are broken" )
96101 t .Parallel ()
102+ skipUnlessDeltasEnabled (t )
97103
98104 dataV0 := tftypes.Object {
99105 AttributeTypes : map [string ]tftypes.Type {
0 commit comments