Skip to content

Commit

Permalink
Display gRPC log if the provider was not configured
Browse files Browse the repository at this point in the history
  • Loading branch information
iwahbe committed Nov 5, 2024
1 parent ad2f99a commit c208077
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions pkg/internal/tests/cross-tests/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,15 @@ func Configure(
require.NoErrorf(t, err, "marshaling Pulumi.yaml")
t.Logf("\n\n%s", yamlProgram)

pulcheck.PulCheck(t, bridgedProvider, string(yamlProgram)).Up(t)

require.True(t, puResult.wasSet, "pulumi configure result was not set (.resourceCreated = %t)",
puResult.resourceCreated)
pt := pulcheck.PulCheck(t, bridgedProvider, string(yamlProgram))
pt.Up(t)

if !puResult.wasSet {
log, err := pt.GrpcLog(t).Marshal()
require.NoError(t, err)
require.Failf(t, "puResult was not set", "pulumi configure result was not set (.resourceCreated = %t)\n%s",
puResult.resourceCreated, string(log))
}
require.True(t, puResult.resourceCreated, "pulumi resource result was not set")

assertResourceDataEqual(t, provider, tfResult.data, puResult.data)
Expand Down

0 comments on commit c208077

Please sign in to comment.